finesse.cymath.sparsemath.CSRMatrix
¶
Overview
- class finesse.cymath.sparsemath.CSRMatrix(ndarray A)¶
Bases:
object
A complex value Compressed Sparse Row (CSR) matrix. This is a useful format for storing a sparse matrix for fast matrix vector products.
This class wraps the csr_matrix structure which is pure C and so can be passed to functions that do not need the GIL.
- Parameters:
- Anp.ndarray[complex, ndim=2]
A dense matrix to convert into a sparse format
Properties
Column index for each non-zero element |
|
Number of columns in matrix |
|
Number of non-zero elements |
|
Index in values and col_index where each row starts |
|
Number of rows in matrix |
|
Sparse matrix non-zero values |
Methods
|
|
|
Compute y = M @ x |
|
Complex (z) valued CSR (csr) general (ge) hermitiain conjugate vector (c) matrix (m) vector (v) product. |
|
Complex (z) valued CSR (csr) general (ge) transpose vector (v) matrix (m) vector (v) product. |