The abstract parent of all sparse matrices.
More...
#include <lil_sparse_matrix.h>
|
typedef vector< int > | idx_vector_type |
|
typedef vector< el_type > | elt_vector_type |
|
|
| lil_sparse_matrix (int n_rows, int n_cols) |
| Default constructor for an abstract matrix. This constructor will be extended by base classes depending on the representation of the matrix (LIL-C or LIL-R).
|
|
int | n_rows () const |
|
int | n_cols () const |
|
int | nnz () const |
|
virtual el_type | coeff (const int &i, const int &j, int offset=0) const =0 |
| Returns A_ij (zero-indexed). This function should be extended by subclasses as it is dependent on the matrix storage type. More...
|
|
virtual std::string | to_string () const =0 |
|
virtual | ~lil_sparse_matrix () |
|
|
int | m_n_rows |
| Number of rows in the matrix.
|
|
int | m_n_cols |
| Number of cols in the matrix.
|
|
int | nnz_count |
| Number of nonzeros in the matrix.
|
|
el_type | eps |
| Machine epsilon for el_type.
|
|
vector< idx_vector_type > | m_idx |
| The row/col indices. The way m_idx is used depends on whether the matrix is in LIL-C or LIL-R.
|
|
vector< elt_vector_type > | m_x |
| The values of the nonzeros in the matrix.
|
|
|
std::ostream & | operator<< (std::ostream &os, const lil_sparse_matrix &A) |
| Allows outputting the contents of the matrix via << operators.
|
|
template<class el_type>
class lil_sparse_matrix< el_type >
The abstract parent of all sparse matrices.
Generic class destructor.
template<class el_type >
virtual el_type lil_sparse_matrix< el_type >::coeff |
( |
const int & |
i, |
|
|
const int & |
j, |
|
|
int |
offset = 0 |
|
) |
| const |
|
pure virtual |
Returns A_ij (zero-indexed). This function should be extended by subclasses as it is dependent on the matrix storage type.
- Parameters
-
i | the row of the (i,j)th element (zero-indexed). |
j | the col of the (i,j)th element (zero-indexed). |
offset | an optional search offset for use in linear search (start at offset instead of 0). |
- Returns
- The (i,j)th element of the matrix.
Implemented in lilc_matrix< el_type >.
- Returns
- Number of cols in the matrix.
- Returns
- Number of rows in the matrix.
- Returns
- Number of nonzeros in the matrix.
The documentation for this class was generated from the following file: