The basic container that stores a base matrix. More...
#include <MatrixBackend.hpp>
Public Member Functions | |
MTLSparseMatrix (DefaultIndexDistribution const &, DefaultIndexDistribution const &) | |
Constructor. Constructs new BaseMatrix. | |
BaseMatrix & | matrix () |
Return a reference to the data-matrix matrix. | |
BaseMatrix const & | matrix () const |
Return a reference to the data-matrix matrix. | |
void | init (Pattern const &pattern) |
void | init () |
void | finish () |
void | insert (size_type r, size_type c, value_type const &value) |
Returns an update-proxy of the inserter, to insert/update a value at position (r , c ) in the matrix. Need an insertionMode inserter, that can be created by init and must be closed by finish after insertion. | |
template<class Ind , class LocalMat > | |
void | scatter (Ind const &idx, LocalMat const &mat) |
template<class RowInd , class ColInd , class LocalMat > | |
void | scatter (RowInd const &rows, ColInd const &cols, LocalMat const &mat) |
template<class RowInd , class ColInd > | |
void | setUnitDiagonals (RowInd const &rowInd, ColInd const &colInd) |
template<class RowInd , class ColInd > | |
void | zeroRows (RowInd const &rowInd, ColInd const &colInd, bool diag) |
Set all entries of the specified rows to zero and the diagonal element to diag | |
template<class RowInd > | |
void | zeroRows (RowInd const &rowInd, bool diag) |
template<class RowInd , class ColInd > | |
void | zeroRowsColumnsImpl (RowInd const &rowInd, ColInd const &colInd, bool diag, MTLVector< T > const *x=nullptr, MTLVector< T > *b=nullptr) |
Set all entries of the specified rows and columns to zero and the diagonal element to diag | |
template<class RowInd > | |
void | zeroRowsColumns (RowInd const &rowInd, bool diag) |
template<class RowInd > | |
void | zeroRowsColumns (RowInd const &rowInd, bool diag, MTLVector< T > const &x, MTLVector< T > &b) |
template<class RowInd , class ColInd > | |
void | zeroRowsColumns (RowInd const &rowInd, ColInd const &colInd, bool diag) |
template<class RowInd , class ColInd > | |
void | zeroRowsColumns (RowInd const &rowInd, ColInd const &colInd, bool diag, MTLVector< T > const &x, MTLVector< T > &b) |
std::size_t | nnz () const |
Return the number of nonzeros in the matrix. | |
SymmetryStructure | symmetry () const |
Symmetry of the matrix entries. | |
The basic container that stores a base matrix.
|
inline |
Delete inserter -> finish insertion. Must be called in order to fill the final construction of the matrix.
|
inline |
Create inserter. Assumes that no inserter is currently active on this matrix. Does not change matrix dimensions.
References MTLSparseMatrix< T >::nnz().
|
inline |
Create inserter. Assumes that no inserter is currently active on this matrix. Resizes the matrix according to the provided pattern.
References SlotSize::cols(), MTLSparseMatrix< T >::nnz(), SlotSize::rows(), SlotSize::rowSizeEstimate(), and SlotSize::symmetry().