A sparse matrix class designed for matrix assembly purpose. More...
#include <DynamicSparseMatrix.h>
A sparse matrix class designed for matrix assembly purpose.
_Scalar | the scalar type, i.e. the type of the coefficients |
Unlike SparseMatrix, this class provides a much higher degree of flexibility. In particular, it allows random read/write accesses in log(rho*outer_size) where rho
is the probability that a coefficient is nonzero and outer_size is the number of columns if the matrix is column-major and the number of rows otherwise.
Internally, the data are stored as a std::vector of compressed vector. The performances of random writes might decrease as the number of nonzeros per inner-vector increase. In practice, we observed very good performance till about 100 nonzeros/vector, and the performance remains relatively good till 500 nonzeros/vectors.
Definition at line 56 of file DynamicSparseMatrix.h.
typedef MappedSparseMatrix<Scalar,Flags> Eigen::DynamicSparseMatrix< _Scalar, _Options, _Index >::Map |
Definition at line 64 of file DynamicSparseMatrix.h.
typedef DynamicSparseMatrix<Scalar,(Flags&~RowMajorBit)|(IsRowMajor?RowMajorBit:0)> Eigen::DynamicSparseMatrix< _Scalar, _Options, _Index >::TransposedSparseMatrix [protected] |
Definition at line 73 of file DynamicSparseMatrix.h.
anonymous enum |
Definition at line 67 of file DynamicSparseMatrix.h.
EIGEN_DEPRECATED Eigen::DynamicSparseMatrix< _Scalar, _Options, _Index >::DynamicSparseMatrix | ( | ) | [inline] |
The class DynamicSparseMatrix is deprectaed
Definition at line 226 of file DynamicSparseMatrix.h.
EIGEN_DEPRECATED Eigen::DynamicSparseMatrix< _Scalar, _Options, _Index >::DynamicSparseMatrix | ( | Index | rows, |
Index | cols | ||
) | [inline] |
The class DynamicSparseMatrix is deprectaed
Definition at line 233 of file DynamicSparseMatrix.h.
EIGEN_DEPRECATED Eigen::DynamicSparseMatrix< _Scalar, _Options, _Index >::DynamicSparseMatrix | ( | const SparseMatrixBase< OtherDerived > & | other | ) | [inline, explicit] |
The class DynamicSparseMatrix is deprectaed
Definition at line 241 of file DynamicSparseMatrix.h.
Eigen::DynamicSparseMatrix< _Scalar, _Options, _Index >::DynamicSparseMatrix | ( | const DynamicSparseMatrix< _Scalar, _Options, _Index > & | other | ) | [inline] |
Definition at line 247 of file DynamicSparseMatrix.h.
Eigen::DynamicSparseMatrix< _Scalar, _Options, _Index >::~DynamicSparseMatrix | ( | ) | [inline] |
Destructor
Definition at line 276 of file DynamicSparseMatrix.h.
std::vector<internal::CompressedStorage<Scalar,Index> >& Eigen::DynamicSparseMatrix< _Scalar, _Options, _Index >::_data | ( | ) | [inline] |
Definition at line 86 of file DynamicSparseMatrix.h.
const std::vector<internal::CompressedStorage<Scalar,Index> >& Eigen::DynamicSparseMatrix< _Scalar, _Options, _Index >::_data | ( | ) | const [inline] |
Definition at line 87 of file DynamicSparseMatrix.h.
Scalar Eigen::DynamicSparseMatrix< _Scalar, _Options, _Index >::coeff | ( | Index | row, |
Index | col | ||
) | const [inline] |
Definition at line 92 of file DynamicSparseMatrix.h.
Scalar& Eigen::DynamicSparseMatrix< _Scalar, _Options, _Index >::coeffRef | ( | Index | row, |
Index | col | ||
) | [inline] |
Definition at line 103 of file DynamicSparseMatrix.h.
Index Eigen::DynamicSparseMatrix< _Scalar, _Options, _Index >::cols | ( | void | ) | const [inline] |
Reimplemented from Eigen::SparseMatrixBase< DynamicSparseMatrix< _Scalar, _Options, _Index > >.
Definition at line 81 of file DynamicSparseMatrix.h.
EIGEN_DEPRECATED void Eigen::DynamicSparseMatrix< _Scalar, _Options, _Index >::endFill | ( | ) | [inline] |
Definition at line 316 of file DynamicSparseMatrix.h.
EIGEN_DEPRECATED Scalar& Eigen::DynamicSparseMatrix< _Scalar, _Options, _Index >::fill | ( | Index | row, |
Index | col | ||
) | [inline] |
*this
is column-major, then there must not exists any nonzero coefficient of coordinates i
x
col such that i
>= row. Otherwise the matrix is invalid.Definition at line 297 of file DynamicSparseMatrix.h.
EIGEN_DEPRECATED Scalar& Eigen::DynamicSparseMatrix< _Scalar, _Options, _Index >::fillrand | ( | Index | row, |
Index | col | ||
) | [inline] |
Definition at line 309 of file DynamicSparseMatrix.h.
void Eigen::DynamicSparseMatrix< _Scalar, _Options, _Index >::finalize | ( | ) | [inline] |
Does nothing: provided for compatibility with SparseMatrix
Definition at line 186 of file DynamicSparseMatrix.h.
Index Eigen::DynamicSparseMatrix< _Scalar, _Options, _Index >::innerNonZeros | ( | Index | j | ) | const [inline] |
Definition at line 84 of file DynamicSparseMatrix.h.
Index Eigen::DynamicSparseMatrix< _Scalar, _Options, _Index >::innerSize | ( | ) | const [inline] |
Reimplemented from Eigen::SparseMatrixBase< DynamicSparseMatrix< _Scalar, _Options, _Index > >.
Definition at line 82 of file DynamicSparseMatrix.h.
Scalar& Eigen::DynamicSparseMatrix< _Scalar, _Options, _Index >::insert | ( | Index | row, |
Index | col | ||
) | [inline] |
Definition at line 165 of file DynamicSparseMatrix.h.
Scalar& Eigen::DynamicSparseMatrix< _Scalar, _Options, _Index >::insertBack | ( | Index | row, |
Index | col | ||
) | [inline] |
Definition at line 150 of file DynamicSparseMatrix.h.
Scalar& Eigen::DynamicSparseMatrix< _Scalar, _Options, _Index >::insertBackByOuterInner | ( | Index | outer, |
Index | inner | ||
) | [inline] |
Definition at line 156 of file DynamicSparseMatrix.h.
Index Eigen::DynamicSparseMatrix< _Scalar, _Options, _Index >::nonZeros | ( | ) | const [inline] |
Reimplemented from Eigen::SparseMatrixBase< DynamicSparseMatrix< _Scalar, _Options, _Index > >.
Definition at line 120 of file DynamicSparseMatrix.h.
DynamicSparseMatrix& Eigen::DynamicSparseMatrix< _Scalar, _Options, _Index >::operator= | ( | const DynamicSparseMatrix< _Scalar, _Options, _Index > & | other | ) | [inline] |
Reimplemented from Eigen::SparseMatrixBase< DynamicSparseMatrix< _Scalar, _Options, _Index > >.
Definition at line 261 of file DynamicSparseMatrix.h.
Index Eigen::DynamicSparseMatrix< _Scalar, _Options, _Index >::outerSize | ( | ) | const [inline] |
Reimplemented from Eigen::SparseMatrixBase< DynamicSparseMatrix< _Scalar, _Options, _Index > >.
Definition at line 83 of file DynamicSparseMatrix.h.
void Eigen::DynamicSparseMatrix< _Scalar, _Options, _Index >::prune | ( | Scalar | reference, |
RealScalar | epsilon = NumTraits<RealScalar>::dummy_precision() |
||
) | [inline] |
Suppress all nonzeros which are smaller than reference under the tolerence epsilon
Definition at line 189 of file DynamicSparseMatrix.h.
void Eigen::DynamicSparseMatrix< _Scalar, _Options, _Index >::reserve | ( | Index | reserveSize = 1000 | ) | [inline] |
Definition at line 130 of file DynamicSparseMatrix.h.
void Eigen::DynamicSparseMatrix< _Scalar, _Options, _Index >::resize | ( | Index | rows, |
Index | cols | ||
) | [inline] |
Resize the matrix without preserving the data (the matrix is set to zero)
Definition at line 197 of file DynamicSparseMatrix.h.
void Eigen::DynamicSparseMatrix< _Scalar, _Options, _Index >::resizeAndKeepData | ( | Index | rows, |
Index | cols | ||
) | [inline] |
Definition at line 208 of file DynamicSparseMatrix.h.
Index Eigen::DynamicSparseMatrix< _Scalar, _Options, _Index >::rows | ( | void | ) | const [inline] |
Reimplemented from Eigen::SparseMatrixBase< DynamicSparseMatrix< _Scalar, _Options, _Index > >.
Definition at line 80 of file DynamicSparseMatrix.h.
void Eigen::DynamicSparseMatrix< _Scalar, _Options, _Index >::setZero | ( | ) | [inline] |
Definition at line 113 of file DynamicSparseMatrix.h.
EIGEN_DEPRECATED void Eigen::DynamicSparseMatrix< _Scalar, _Options, _Index >::startFill | ( | Index | reserveSize = 1000 | ) | [inline] |
Definition at line 282 of file DynamicSparseMatrix.h.
void Eigen::DynamicSparseMatrix< _Scalar, _Options, _Index >::startVec | ( | Index | ) | [inline] |
Does nothing: provided for compatibility with SparseMatrix
Definition at line 143 of file DynamicSparseMatrix.h.
void Eigen::DynamicSparseMatrix< _Scalar, _Options, _Index >::swap | ( | DynamicSparseMatrix< _Scalar, _Options, _Index > & | other | ) | [inline] |
Definition at line 253 of file DynamicSparseMatrix.h.
std::vector<internal::CompressedStorage<Scalar,Index> > Eigen::DynamicSparseMatrix< _Scalar, _Options, _Index >::m_data [protected] |
Definition at line 76 of file DynamicSparseMatrix.h.
Index Eigen::DynamicSparseMatrix< _Scalar, _Options, _Index >::m_innerSize [protected] |
Definition at line 75 of file DynamicSparseMatrix.h.