ezp
lightweight C++ wrapper for selected distributed solvers for linear systems
Loading...
Searching...
No Matches
ezp::sparse_csr_mat< DT, IT > Struct Template Referencefinal
Collaboration diagram for ezp::sparse_csr_mat< DT, IT >:
[legend]

Public Member Functions

 sparse_csr_mat (const sparse_csr_mat &other)
 
 sparse_csr_mat (sparse_csr_mat &&)=delete
 
sparse_csr_matoperator= (const sparse_csr_mat &)=delete
 
sparse_csr_matoperator= (sparse_csr_mat &&)=default
 
 sparse_csr_mat (const IT n, const IT nnz, IT *const row_ptr, IT *const col_idx, DT *const data)
 
template<data_t DT2, index_t IT2>
 sparse_csr_mat (const sparse_coo_mat< DT2, IT2 > &coo, const bool one_based=false, const bool full=false)
 
auto condense (const bool one_based, const bool full)
 
auto is_valid ()
 

Public Attributes

IT n
 
IT nnz
 
IT * row_ptr
 
IT * col_idx
 
DT * data
 
std::vector< IT > row_storage
 
std::vector< IT > col_storage
 
std::vector< DT > data_storage
 

Constructor & Destructor Documentation

◆ sparse_csr_mat()

template<data_t DT, index_t IT>
template<data_t DT2, index_t IT2>
ezp::sparse_csr_mat< DT, IT >::sparse_csr_mat ( const sparse_coo_mat< DT2, IT2 > &  coo,
const bool  one_based = false,
const bool  full = false 
)
inlineexplicit

Construct a CSR matrix from a COO matrix. The input matrix will be sorted, duplicated entries will be summed.

Parameters
cooThe input matrix in the COO format.
one_basedIndicate if the input matrix uses one based indexing (if true) or zero based indexing (if false). This flag will be used to generate correct row indexing.
fullSome solvers require diagonal entries to be explicitly present even if they are trivial, if true, all diagonal entries will be explicitly set regardless of the actual values.

The documentation for this struct was generated from the following file: