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.

Classes | |
| class | InnerIterator |
Public Types | |
| enum | { Options = _Options } |
| typedef MappedSparseMatrix < Scalar, Flags > | Map |
Public Member Functions | |
| Index | rows () const |
| Index | cols () const |
| Index | innerSize () const |
| Index | outerSize () const |
| Index | innerNonZeros (Index j) const |
| std::vector< CompressedStorage < Scalar, Index > > & | _data () |
| const std::vector < CompressedStorage< Scalar, Index > > & | _data () const |
| Scalar | coeff (Index row, Index col) const |
| Scalar & | coeffRef (Index row, Index col) |
| void | setZero () |
| Index | nonZeros () const |
| void | reserve (Index reserveSize=1000) |
| void | startVec (Index) |
| Does nothing: provided for compatibility with SparseMatrix. | |
| Scalar & | insertBack (Index row, Index col) |
| Scalar & | insertBackByOuterInner (Index outer, Index inner) |
| Scalar & | insert (Index row, Index col) |
| void | finalize () |
| Does nothing: provided for compatibility with SparseMatrix. | |
| void | prune (Scalar reference, RealScalar epsilon=NumTraits< RealScalar >::dummy_precision()) |
| Suppress all nonzeros which are smaller than reference under the tolerence epsilon. | |
| void | resize (Index rows, Index cols) |
| Resize the matrix without preserving the data (the matrix is set to zero) | |
| void | resizeAndKeepData (Index rows, Index cols) |
| DynamicSparseMatrix () | |
| DynamicSparseMatrix (Index rows, Index cols) | |
| template<typename OtherDerived > | |
| DynamicSparseMatrix (const SparseMatrixBase< OtherDerived > &other) | |
| DynamicSparseMatrix (const DynamicSparseMatrix &other) | |
| void | swap (DynamicSparseMatrix &other) |
| DynamicSparseMatrix & | operator= (const DynamicSparseMatrix &other) |
| ~DynamicSparseMatrix () | |
| Destructor. | |
| EIGEN_DEPRECATED void | startFill (Index reserveSize=1000) |
| EIGEN_DEPRECATED Scalar & | fill (Index row, Index col) |
| EIGEN_DEPRECATED Scalar & | fillrand (Index row, Index col) |
| EIGEN_DEPRECATED void | endFill () |
Protected Types | |
| typedef DynamicSparseMatrix < Scalar,(Flags &~RowMajorBit)|(IsRowMajor?RowMajorBit:0)> | TransposedSparseMatrix |
Protected Attributes | |
| Index | m_innerSize |
| std::vector< CompressedStorage < Scalar, Index > > | m_data |
| typedef MappedSparseMatrix<Scalar,Flags> Eigen::DynamicSparseMatrix::Map |
typedef DynamicSparseMatrix<Scalar,(Flags&~RowMajorBit)|(IsRowMajor?RowMajorBit:0)> Eigen::DynamicSparseMatrix::TransposedSparseMatrix [protected] |
| Eigen::DynamicSparseMatrix::DynamicSparseMatrix | ( | const SparseMatrixBase< OtherDerived > & | other | ) | [inline, explicit] |
| Eigen::DynamicSparseMatrix::DynamicSparseMatrix | ( | const DynamicSparseMatrix & | other | ) | [inline] |
| Eigen::DynamicSparseMatrix::~DynamicSparseMatrix | ( | ) | [inline] |
| std::vector<CompressedStorage<Scalar,Index> >& Eigen::DynamicSparseMatrix::_data | ( | ) | [inline] |
| const std::vector<CompressedStorage<Scalar,Index> >& Eigen::DynamicSparseMatrix::_data | ( | ) | const [inline] |
| Index Eigen::DynamicSparseMatrix::cols | ( | void | ) | const [inline] |
Reimplemented from Eigen::SparseMatrixBase< DynamicSparseMatrix< _Scalar, _Options, _Index > >.
| EIGEN_DEPRECATED void Eigen::DynamicSparseMatrix::endFill | ( | ) | [inline] |
Provided for compatibility with SparseMatrix.
In other words, assuming *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.
Compared to the generic coeffRef(), the unique limitation is that we assume the coefficient does not exist yet.
| void Eigen::DynamicSparseMatrix::finalize | ( | ) | [inline] |
Does nothing: provided for compatibility with SparseMatrix.
| Index Eigen::DynamicSparseMatrix::innerSize | ( | ) | const [inline] |
Reimplemented from Eigen::SparseMatrixBase< DynamicSparseMatrix< _Scalar, _Options, _Index > >.
| Index Eigen::DynamicSparseMatrix::nonZeros | ( | ) | const [inline] |
Reimplemented from Eigen::SparseMatrixBase< DynamicSparseMatrix< _Scalar, _Options, _Index > >.
| DynamicSparseMatrix& Eigen::DynamicSparseMatrix::operator= | ( | const DynamicSparseMatrix & | other | ) | [inline] |
| Index Eigen::DynamicSparseMatrix::outerSize | ( | ) | const [inline] |
Reimplemented from Eigen::SparseMatrixBase< DynamicSparseMatrix< _Scalar, _Options, _Index > >.
| void Eigen::DynamicSparseMatrix::reserve | ( | Index | reserveSize = 1000 | ) | [inline] |
| Index Eigen::DynamicSparseMatrix::rows | ( | void | ) | const [inline] |
Reimplemented from Eigen::SparseMatrixBase< DynamicSparseMatrix< _Scalar, _Options, _Index > >.
| EIGEN_DEPRECATED void Eigen::DynamicSparseMatrix::startFill | ( | Index | reserveSize = 1000 | ) | [inline] |
| void Eigen::DynamicSparseMatrix::startVec | ( | Index | ) | [inline] |
Does nothing: provided for compatibility with SparseMatrix.
| void Eigen::DynamicSparseMatrix::swap | ( | DynamicSparseMatrix & | other | ) | [inline] |
std::vector<CompressedStorage<Scalar,Index> > Eigen::DynamicSparseMatrix::m_data [protected] |
Index Eigen::DynamicSparseMatrix::m_innerSize [protected] |
| Page generated by Doxygen 1.7.5 for MRPT 0.9.5 SVN: at Sun Oct 16 12:16:33 UTC 2011 |