Home > @josh-brown/vector > SparseMatrix
Implements Matrix with a map of indices to nonzero values.
Signature:
export declare abstract class SparseMatrix<S = number> implements Matrix<S> Implements: Matrix<S>
Subclasses must specify the usual scalar operations on their contents.
The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the SparseMatrix class.
|
Method |
Modifiers |
Description |
|---|---|---|
|
Implements matrix addition | ||
|
Returns the adjoint of the matrix | ||
|
Applies the matrix as a linear transformation to the given vector. Implements matrix-vector multiplication. | ||
|
|
Returns a MatrixBuilder which will build new matrices of the same type | |
|
Builds a matrix by combining element-wise the values of this matrix with the values of another matrix. | ||
|
Tests if two matrices are equal | ||
|
Executes the | ||
|
Returns a vector corresponding to the column at index | ||
|
An array of vectors corresponding to the columns of the matrix | ||
|
Returns a vector containing the elements of the main diagonal of the matrix | ||
|
Returns the entry of the matrix at the specified indices | ||
|
Returns the number of columns in the matrix | ||
|
Returns the number of rows in the matrix | ||
|
Returns a vector corresponding to the row at index | ||
|
Returns an array of vectors corresponding to the rows of the matrix | ||
|
Returns a tuple representing the dimensions of the matrix. The first entry is the number of rows, and the second entry is the number of columns. | ||
|
Returns the contents of the matrix as a nested map of rowIndex to columnIndex to nonzero value | ||
|
Builds a matrix by transforming the values of the current matrix. | ||
|
Implements matrix multiplication | ||
|
|
Returns a ScalarOperations object which will allow consumers to work generically with the scalars contained in the vector. | |
|
Implements multiplication of a matrix by a scalar | ||
|
Returns a new matrix equal to the old one, except with the entry at | ||
|
Returns the contents of the matrix as a 2-D array. | ||
|
Returns the trace of the matrix | ||
|
Returns the transpose of the matrix | ||
|
|
Returns a VectorBuilder which will build new vectors of a compatible type |