- Preparing search index...
- The search index is not available
sparse-matrix
Accessors
col
- get col(): number
-
Returns number
row
- get row(): number
-
Returns number
size
- get size(): number
-
Returns number
Methods
Private
find
- find(row: number, col: number): [boolean, number]
-
Returns [boolean, number]
get
- get(row: number, col: number): number
-
Returns number
map
- map(func: ((value: number, row: number, col: number) => number)): Matrix
-
Parameters
-
func: ((value: number, row: number, col: number) => number)
-
- (value: number, row: number, col: number): number
-
Parameters
-
value: number
-
row: number
-
col: number
Returns number
set
- set(row: number, col: number, value: number): Matrix
-
Parameters
-
row: number
-
col: number
-
value: number
to2d
- to2d(): number[][]
-
Returns number[][]
Static
empty
- empty(row: number, col: number): Matrix
-
Static
from2d
- from2d(data: number[][]): Matrix
-
A Matrix class that uses sparse matrix representation under the hood.