|
| SparseMatrix () |
| create as empty
|
|
| SparseMatrix (Int r, Int c) |
| Create a matrix with r rows and c columns, (implicitly) initialize all elements to 0.
|
|
template<typename Iterator > |
| SparseMatrix (Int r, Int c, Iterator &&src) |
|
| SparseMatrix (const GenericMatrix< SparseMatrix > &M) |
| Copy of a disguised Matrix object.
|
|
template<typename TMatrix2 > |
| SparseMatrix (const GenericMatrix< TMatrix2, E > &M, std::enable_if_t< SparseMatrix::template compatible_symmetry_types< TMatrix2 >(), std::nullptr_t >=nullptr) |
| Copy of an abstract matrix of the same element type.
|
|
template<typename TMatrix2 , typename E2 > |
| SparseMatrix (const GenericMatrix< TMatrix2, E2 > &M, std::enable_if_t<(SparseMatrix::template compatible_symmetry_types< TMatrix2 >() &&can_initialize< E2, E >::value), std::nullptr_t >=nullptr) |
| Copy of an abstract matrix with element conversion.
|
|
SparseMatrix & | operator= (const SparseMatrix &other) |
|
void | swap (SparseMatrix &M) |
|
void | resize (Int r, Int c) |
| Resize to new dimensions, added elements initialized with default constructor.
|
|
void | clear () |
| Truncate to 0x0 matrix.
|
|
void | remove0s () |
| Physically remove all zero elements that might have creeped in by some previous operation.
|
|
void | squeeze () |
| Remove all empty (i.e., consisting entirely of implicit zeroes,) rows, renumber the rest, and reduce the dimensions.
|
|
void | squeeze_cols () |
| Remove all empty (i.e., consisting entirely of implicit zeroes,) columns, renumber the rest, and reduce the dimensions.
|
|
template<typename TPerm > |
std::enable_if_t< isomorphic_to_container_of< TPerm, Int >::value > | permute_rows (const TPerm &perm) |
|
template<typename TPerm > |
std::enable_if_t< isomorphic_to_container_of< TPerm, Int >::value > | permute_cols (const TPerm &perm) |
|
A two-dimensional associative array with row and column indices as keys.
A two-dimensional associative array with row and column indices as keys; elements equal to the default value (ElementType(), which is 0 for most numerical types) are not stored, but implicitly encoded by the gaps in the key set. Each row and column is organized as a balanced binary search (AVL) tree.
template<typename Iterator >
pm::SparseMatrix::SparseMatrix |
( |
Int |
r, |
|
|
Int |
c, |
|
|
Iterator && |
src |
|
) |
| |
|
inline |
Create a matrix with r rows and c columns, initialize the elements from a data sequence. src should iterate either over r*c scalar values, corresponding to the elements in the row order (the column index changes first,) or over r vectors of dimension c, corresponding to the matrix rows. Zero input elements are filtered out.