Skip to content

Latest commit

 

History

History
56 lines (27 loc) · 965 Bytes

File metadata and controls

56 lines (27 loc) · 965 Bytes

Home > @josh-brown/vector > SparseMatrix > map

SparseMatrix.map() method

Builds a matrix by transforming the values of the current matrix.

Signature:

map(entryFunction: (entry: S, rowIndex: number, columnIndex: number) => S): Matrix<S>;

Parameters

Parameter

Type

Description

entryFunction

(entry: S, rowIndex: number, columnIndex: number) => S

A function which takes an entry of the original matrix and its indices, and returns the corresponding entry of the new matrix

Returns:

Matrix<S>

The new matrix