Home > @josh-brown/vector > SparseMatrix > map
Builds a matrix by transforming the values of the current matrix.
Signature:
map(entryFunction: (entry: S, rowIndex: number, columnIndex: number) => S): Matrix<S>;|
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