Class CsrCMatrix

java.lang.Object
All Implemented Interfaces:
Serializable, ComplexMatrixMixin<CsrCMatrix>, ComplexTensorMixin<CsrCMatrix,CsrMatrix>, MatrixComparisonsMixin<CsrCMatrix>, MatrixManipulationsMixin<CsrCMatrix,CNumber>, MatrixMixin<CsrCMatrix,CMatrix,CsrCMatrix,CsrCMatrix,CsrCMatrix,CNumber,CooCVector,CVector>, MatrixOperationsMixin<CsrCMatrix,CMatrix,CsrCMatrix,CsrCMatrix,CsrCMatrix,CNumber,CooCVector,CVector>, MatrixPropertiesMixin, SparseTensorMixin, TensorComparisonsMixin, TensorManipulationsMixin<CsrCMatrix>, TensorOperationsMixin<CsrCMatrix,CMatrix,CsrCMatrix,CMatrix,CsrMatrix,CNumber>, TensorPropertiesMixin

Complex sparse matrix stored in compressed sparse row (CSR) format.

CSR matrices are best suited for efficient access and matrix operations. Specifically, matrix-matrix and matrix-vector multiplication. CSR matrices are not well suited for modification (see CooCMatrix).

The CSR format stores a sparse m-by-n matrix as three one-dimensional arrays: TensorBase.entries, rowPointers, and colIndices.

  • entries: Stores the non-zero values of the sparse matrix. Note, zero values can be stored explicitly in this array. Hence, the term "non-zero values" is a misnomer.
  • rowPointers: Encodes the total number of non-zero values above each row. Has length m+1. For example, rowPointers[j] contains the total number of non-zero values above row j. The first entry is always 0 and the last element is always entries.length
  • colIndices: Contains the column indices for all non-zero entries. Has length entries.length
See Also: