SparseMatrix
Represents a sparse matrix using the Compressed Sparse Row (CSR) format.
The CSR format stores a sparse matrix using three arrays:
values: stores the non-zero values of the matrix
columnIndices: stores the column indices of the non-zero values
rowPointers: stores the starting position of each row in the values array
This format is memory-efficient for sparse matrices where most elements are zero.
Constructors
Properties
Functions
Creates a copy of this sparse matrix.
Calculates the Frobenius norm of the sparse matrix. The Frobenius norm is the square root of the sum of the squares of all the non-zero elements in the matrix.
Checks if this sparse matrix is symmetric within a specified tolerance.
Extension function to subtract a SparseMatrix from another SparseMatrix.
Extension function to subtract a Matrix from a SparseMatrix.
Returns the number of non-zero elements in this sparse matrix.
Extension function to add two SparseMatrices.
Adds this sparse matrix to another matrix and returns the resulting matrix.
Multiplies this sparse matrix by a scalar value.
Multiplies this sparse matrix with another sparse matrix and returns the resulting sparse matrix.
Multiplies this sparse matrix with another matrix and returns the resulting matrix.
Creates a dense Matrix representation of this sparse matrix.
Creates a transposed version of this sparse matrix.