#include <csr_form.hpp>
|
| | csr_form ()=default |
| |
| | csr_form (const csr_form &) |
| |
| | csr_form (csr_form &&) noexcept |
| |
| csr_form & | operator= (const csr_form &) |
| |
| csr_form & | operator= (csr_form &&) noexcept |
| |
| | ~csr_form ()=default |
| |
| const index_t * | row_mem () const |
| |
| const index_t * | col_mem () const |
| |
| const data_t * | val_mem () const |
| |
| index_t * | row_mem () |
| |
| index_t * | col_mem () |
| |
| data_t * | val_mem () |
| |
| data_t | max () const |
| |
| void | print () const |
| |
| template<sp_d T2> |
| csr_form | operator* (const T2 scalar) const |
| |
| template<sp_d T2> |
| csr_form | operator/ (const T2 scalar) const |
| |
| template<sp_d T2> |
| csr_form & | operator*= (const T2 scalar) |
| |
| template<sp_d T2> |
| csr_form & | operator/= (const T2 scalar) |
| |
| template<sp_d in_dt, sp_i in_it> |
| | csr_form (triplet_form< in_dt, in_it > &, SparseBase=SparseBase::ZERO, bool=false) |
| | Constructs a CSR (Compressed Sparse Row) representation of a sparse matrix from a triplet-form matrix.
|
| |
| template<sp_d in_dt, sp_i in_it> |
| | csr_form (triplet_form< in_dt, in_it > &&in_mat, const SparseBase in_base=SparseBase::ZERO, const bool in_full=false) |
| |
| template<sp_d in_dt, sp_i in_it> |
| csr_form & | operator= (triplet_form< in_dt, in_it > &) |
| |
| data_t | operator() (const index_t in_row, const index_t in_col) const |
| |
| Mat< data_t > | operator* (const Col< data_t > &in_mat) const |
| |
| Mat< data_t > | operator* (const Mat< data_t > &in_mat) const |
| |
| template<sp_d in_dt, sp_i in_it> |
| csr_form< data_t, index_t > & | operator= (triplet_form< in_dt, in_it > &in_mat) |
| |
◆ csr_form() [1/5]
◆ csr_form() [2/5]
◆ csr_form() [3/5]
◆ ~csr_form()
◆ csr_form() [4/5]
Constructs a CSR (Compressed Sparse Row) representation of a sparse matrix from a triplet-form matrix.
- Template Parameters
-
| data_t | The data type of the values in the sparse matrix. |
| index_t | The data type of the indices in the sparse matrix. |
| in_dt | The data type of the input triplet-form matrix values. |
| in_it | The data type of the input triplet-form matrix indices. |
- Parameters
-
| in_mat | The input matrix in triplet form. |
| base | The base for indexing (e.g., 0 for zero-based indexing, 1 for one-based indexing). |
| full | A boolean flag indicating whether to include all diagonal entries. |
This constructor initializes the CSR representation of a sparse matrix by converting the input triplet-form matrix. Depending on the full parameter, it either fully condenses the triplet-form matrix or performs a partial condensation. The row pointers, column indices, and values are computed and stored in the CSR format. The indexing is adjusted based on the specified base (0 or 1).
Some sparse solvers require the presence of all diagonal entries in the matrix, even if some are zeros. The flag full indicates whether to include all diagonal entries in the CSR representation. This is useful to stamp out some weird segfaults.
◆ csr_form() [5/5]
◆ col_mem() [1/2]
| index_t * csr_form< data_t, index_t >::col_mem |
( |
| ) |
|
|
inline |
◆ col_mem() [2/2]
| const index_t * csr_form< data_t, index_t >::col_mem |
( |
| ) |
const |
|
inline |
◆ max()
| data_t csr_form< data_t, index_t >::max |
( |
| ) |
const |
|
inline |
◆ operator()()
| data_t csr_form< data_t, index_t >::operator() |
( |
const index_t |
in_row, |
|
|
const index_t |
in_col |
|
) |
| const |
|
inline |
◆ operator*() [1/3]
| Mat< data_t > csr_form< data_t, index_t >::operator* |
( |
const Col< data_t > & |
in_mat | ) |
const |
|
inline |
◆ operator*() [2/3]
| Mat< data_t > csr_form< data_t, index_t >::operator* |
( |
const Mat< data_t > & |
in_mat | ) |
const |
|
inline |
◆ operator*() [3/3]
◆ operator*=()
◆ operator/()
◆ operator/=()
◆ operator=() [1/4]
◆ operator=() [2/4]
◆ operator=() [3/4]
◆ operator=() [4/4]
◆ print()
| void csr_form< data_t, index_t >::print |
( |
| ) |
const |
◆ row_mem() [1/2]
| index_t * csr_form< data_t, index_t >::row_mem |
( |
| ) |
|
|
inline |
◆ row_mem() [2/2]
| const index_t * csr_form< data_t, index_t >::row_mem |
( |
| ) |
const |
|
inline |
◆ val_mem() [1/2]
| data_t * csr_form< data_t, index_t >::val_mem |
( |
| ) |
|
|
inline |
◆ val_mem() [2/2]
| const data_t * csr_form< data_t, index_t >::val_mem |
( |
| ) |
const |
|
inline |
◆ n_cols
| const index_t csr_form< data_t, index_t >::n_cols = 0 |
◆ n_elem
| const index_t csr_form< data_t, index_t >::n_elem = 0 |
◆ n_rows
| const index_t csr_form< data_t, index_t >::n_rows = 0 |
The documentation for this class was generated from the following files: