Template Class CSRMatrix
Class Documentation
-
template<class Precision, class IndexT>
class CSRMatrix
Manage memory of Compressed Sparse Row (CSR) sparse matrix. CSR format represents a matrix M by three (one-dimensional) arrays, that respectively contain nonzero values, row offsets, and column indices.
- Template Parameters:
-
Public Functions
-
inline CSRMatrix(std::size_t num_rows, std::size_t nnz)
-
inline CSRMatrix(std::size_t num_rows, std::size_t nnz, IndexT *column_ptr, IndexT *csrOffsets_ptr, std::complex<Precision> *value_ptr)
-
CSRMatrix() = default
-
inline auto getColumns() -> std::vector<IndexT>&
Get the CSR format index vector of the matrix.
-
inline auto getCsrOffsets() -> std::vector<IndexT>&
Get CSR format offset vector of the matrix.
-
inline auto getValues() -> std::vector<std::complex<Precision>>&
Get CSR format data vector of the matrix.
api/classPennylane_1_1LightningGPU_1_1MPI_1_1CSRMatrix