|
static constexpr Index | s_invalidIndex = std::is_signed_v<Index> ? std::numeric_limits<Index>::lowest() : std::numeric_limits<Index>::max() |
|
static constexpr sofa::Index | NL = CRSMatrix::NL |
| Number of rows of a block. More...
|
|
static constexpr sofa::Index | NC = CRSMatrix::NC |
| Number of columns of a block. More...
|
|
static constexpr sofa::Index | NL |
| Number of rows of a block. More...
|
|
static constexpr sofa::Index | NC |
| Number of columns of a block. More...
|
|
static constexpr Index | s_invalidIndex |
|
static constexpr bool | AutoSize = true |
|
static constexpr bool | AutoCompress = true |
|
static constexpr bool | CompressZeros = false |
|
static constexpr bool | ClearByZeros = false |
|
static constexpr bool | OrderedInsertion = false |
|
static constexpr int | matrixType = 2 |
|
static constexpr bool | IsAlwaysSquare = false |
| Set to true if this matrix is always square (must be true for symmetric) More...
|
|
static constexpr bool | IsAlwaysSymmetric = false |
| Set to true if this matrix is always symmetric (IsAlwaysSquare should be true) More...
|
|
static constexpr bool | AutoSize = false |
| Set to true if the size of the matrix should be automatically increased when new blocks are added. More...
|
|
static constexpr bool | AutoCompress = true |
| Set to true if the matrix should be automatically compressed (easier to use, but might cause issues in multithreading) More...
|
|
static constexpr bool | CompressZeros = true |
| Set to true if the blocks that are all zeros should be removed from the matrix when compressing (expensive) More...
|
|
static constexpr bool | ClearByZeros = true |
| Set to true if clear methods will put all concerned value to zero instead of clearing vectors (CompressZeros should be true) More...
|
|
static constexpr bool | OrderedInsertion = false |
| Set to true if insertion in matrix are in most case at last line index or last col index. More...
|
|
static constexpr bool | StoreLowerTriangularBlock = true |
| Set to false to disable storage of blocks on the lower triangular part (IsAlwaysSymmetric must be true) More...
|
|
static constexpr int | matrixType = 0 |
| Do not change this value, has to be overrided for all derivated class. More...
|
|
|
| CompressedRowSparseMatrixConstraint () |
|
| CompressedRowSparseMatrixConstraint (Index nbRow, Index nbCol) |
|
bool | empty () const |
|
RowConstIterator | begin () const |
| Get the iterator corresponding to the beginning of the rows of blocks. More...
|
|
RowConstIterator | end () const |
| Get the iterator corresponding to the end of the rows of blocks. More...
|
|
RowConstIterator | cbegin () const |
| Get the iterator corresponding to the beginning of the rows of blocks. More...
|
|
RowConstIterator | cend () const |
| Get the iterator corresponding to the end of the rows of blocks. More...
|
|
size_t | size () const |
| Get the number of constraint. More...
|
|
RowConstIterator | readLine (Index lIndex) const |
|
RowWriteAccessor | writeLine (Index lIndex) |
|
void | setLine (Index lIndex, RowType row) |
|
void | addLine (Index lIndex, RowType row) |
|
template<class VecDeriv > |
void | multTransposeBaseVector (VecDeriv &res, const sofa::linearalgebra::BaseVector *lambda) const |
|
void | prettyPrint (std::ostream &out=std::cout) const |
| write into output stream (default is standard output) More...
|
|
| CompressedRowSparseMatrixGeneric () |
|
| CompressedRowSparseMatrixGeneric (Index nbBlockRow, Index nbBlockCol) |
|
virtual | ~CompressedRowSparseMatrixGeneric ()=default |
|
Index | rowBSize () const |
|
Index | colBSize () const |
|
const VecIndex & | getRowIndex () const |
|
const VecIndex & | getRowBegin () const |
|
Range | getRowRange (Index id) const |
| Returns the range of indices from the column indices corresponding to the id-th row. More...
|
|
const VecIndex & | getColsIndex () const |
|
const VecBlock & | getColsValue () const |
|
virtual void | resizeBlock (Index nbBRow, Index nbBCol) |
|
void | resizeBloc (Index nbBRow, Index nbBCol) |
|
void | compress () |
|
void | swap (Matrix &m) |
|
void | fullRows () |
| Make sure all rows have an entry even if they are empty. More...
|
|
void | shiftIndices (Index base) |
|
const Block & | block (Index i, Index j) const |
| Get block method. More...
|
|
const Block & | bloc (Index i, Index j) const |
|
Block * | wblock (Index i, Index j, bool create=false) |
| Write block method. More...
|
|
Block * | wblock (Index i, Index j, Index &rowId, Index &colId, bool create=false) |
| Write block method when rowId and colId are known, this is an optimized wblock specification. More...
|
|
Block * | wbloc (Index i, Index j, bool create=false) |
|
const Block & | getBlock (Index i, Index j) const |
|
const BlockTranspose | getSymBlock (Index i, Index j) const |
|
void | setBlock (Index i, Index j, const Block &v) |
|
void | setBlock (Index i, Index j, Index &rowId, Index &colId, const Block &v) |
|
void | addBlock (Index i, Index j, const Block &v) |
|
void | addBlock (Index i, Index j, Index &rowId, Index &colId, const Block &v) |
|
Block * | getWBlock (Index i, Index j, bool create=false) |
|
void | clearRowBlock (Index i) |
| Clear row block method. Clear all col of this line. More...
|
|
void | clearColBlock (Index j) |
| Clear col block method. Clear this col in all row of matrix. More...
|
|
std::size_t | countEmptyBlocks () const |
|
void | clearRowColBlock (Index i) |
| Clear both row i and column i in a square matrix. More...
|
|
void | clear () |
| Completely clear the matrix. More...
|
|
bool | check_matrix () |
|
std::ostream & | write (std::ostream &os) const |
|
std::istream & | read (std::istream &is) |
|
void | add (unsigned int bi, unsigned int bj, const Block &b) |
|
void | add (unsigned int bi, unsigned int bj, int &rowId, int &colId, const Block &b) |
|
void | addDBlock (unsigned int bi, unsigned int bj, const DBlock &b) |
|
void | addDValue (unsigned int bi, unsigned int bj, const Real b) |
|
void | addDValue (unsigned int bi, unsigned int bj, int &rowId, int &colId, const Real b) |
|
void | addDiag (unsigned int bi, const Block &b) |
|
void | addDiag (unsigned int bi, int &rowId, int &colId, const Block &b) |
|
void | addDiagDBlock (unsigned int bi, const DBlock &b) |
|
void | addDiagDValue (unsigned int bi, const Real b) |
|
void | addDiagDValue (unsigned int bi, int &rowId, int &colId, const Real b) |
|
void | addSym (unsigned int bi, unsigned int bj, const Block &b) |
|
void | addSym (unsigned int bi, unsigned int bj, int &rowId, int &colId, int &rowIdT, int &colIdT, const Block &b) |
|
void | addSymDBlock (unsigned int bi, unsigned int bj, const DBlock &b) |
|
void | addSymDValue (unsigned int bi, unsigned int bj, const Real b) |
|
void | addSymDValue (unsigned int bi, unsigned int bj, int &rowId, int &colId, int &rowIdT, int &colIdT, Real b) |
|
void | transposeFullRows (CompressedRowSparseMatrixGeneric< TBlock2, TPolicy2 > &res) const |
| Transpose the matrix into res, works only for 3 array variant ("full rows") matrices, ie which can be expressed using the rowBegin, colsIndex and colsValue arrays solely. More...
|
|
void | mul (CompressedRowSparseMatrixGeneric< RB, RP > &res, const CompressedRowSparseMatrixGeneric< MB, MP > &m) const |
|
void | mulTranspose (CompressedRowSparseMatrixGeneric< RB, RP > &res, const CompressedRowSparseMatrixGeneric< MB, MP > &m) const |
|
|
Index | nBlockRow |
| Size. More...
|
|
Index | nBlockCol |
| Mathematical size of the matrix, in blocks. More...
|
|
VecIndex | rowIndex |
| Compressed sparse data structure. More...
|
|
VecIndex | rowBegin |
| column indices of non-empty blocks in each row. The column indices of the non-empty block within the i-th non-empty row are all the colsIndex[j], j in [rowBegin[i],rowBegin[i+1]) More...
|
|
VecIndex | colsIndex |
| column indices of all the non-empty blocks, sorted by increasing row index and column index More...
|
|
VecBlock | colsValue |
| values of the non-empty blocks, in the same order as in colsIndex More...
|
|
VecFlag | touchedBlock |
| boolean vector, i-th value is true if block has been touched since last compression. More...
|
|
VecIndexedBlock | btemp |
| Additional storage to make block insertion more efficient. More...
|
|
bool | skipCompressZero |
|
VecIndex | oldRowIndex |
| Temporary vectors used during compression. More...
|
|
VecIndex | oldRowBegin |
|
VecIndex | oldColsIndex |
|
VecBlock | oldColsValue |
|
bool | registerNewCol (Index &colId, TBlock &bvalue) |
| Add a new col into matrix. More...
|
|
std::pair< Index, Index > | registerBtempLine (typename VecIndexedBlock::const_iterator &itbtemp) |
| Add a complete new line from btemp into matrix. More...
|
|
void | fullyCompressBtemp () |
| Clear matrix and just add btemp array. More...
|
|
Block * | insertBtemp (const Index i, const Index j) |
| Method to easy insert new block into btemp. More...
|
|
Index | getMaxColIndex () |
| Method to easy have the max colIndex. Could only be used if AutoSize policy is activated. More...
|
|
void | deleteRow (Index rowId) |
| Method to easy delete row given position in rowIndex. More...
|
|
void | compressBtemp () |
| Clear matrix and compute new triplet's arrays by combining old ones and btemp(VecIndexedBlock) array. More...
|
|
void | compressCSR () |
|
void | writeVector (const TVec &vec, std::ostream &os) |
|
void | readVector (TVec &vec, std::istream &in) |
|