The main sparse matrix class.
This class implements a sparse matrix using the very common compressed row/column storage scheme.
| _Scalar | the scalar type, i.e. the type of the coefficients |
| _Options | Union of bit flags controlling the storage scheme. Currently the only possibility is RowMajor. The default is 0 which means column-major. |
| _Index | the type of the indices. Default is int. |
See http://www.netlib.org/linalg/html_templates/node91.html for details on the storage scheme.
This class can be extended with the help of the plugin mechanism described on the page TopicCustomizingEigen by defining the preprocessor symbol EIGEN_SPARSEMATRIX_PLUGIN.

Classes | |
| struct | default_prunning_func |
| class | InnerIterator |
Public Types | |
| enum | { Options = _Options } |
| typedef MappedSparseMatrix < Scalar, Flags > | Map |
| typedef CompressedStorage < Scalar, Index > | Storage |
Public Member Functions | |
| Index | rows () const |
| Index | cols () const |
| Index | innerSize () const |
| Index | outerSize () const |
| Index | innerNonZeros (Index j) const |
| const Scalar * | _valuePtr () const |
| Scalar * | _valuePtr () |
| const Index * | _innerIndexPtr () const |
| Index * | _innerIndexPtr () |
| const Index * | _outerIndexPtr () const |
| Index * | _outerIndexPtr () |
| Storage & | data () |
| const Storage & | data () const |
| Scalar | coeff (Index row, Index col) const |
| Scalar & | coeffRef (Index row, Index col) |
| void | setZero () |
| Removes all non zeros. | |
| Index | nonZeros () const |
| void | reserve (Index reserveSize) |
| Preallocates reserveSize non zeros. | |
| Scalar & | insertBack (Index row, Index col) |
| Scalar & | insertBackByOuterInner (Index outer, Index inner) |
| Scalar & | insertBackByOuterInnerUnordered (Index outer, Index inner) |
| void | startVec (Index outer) |
| EIGEN_DONT_INLINE Scalar & | insert (Index row, Index col) |
| void | finalize () |
| Must be called after inserting a set of non zero entries. | |
| void | prune (Scalar reference, RealScalar epsilon=NumTraits< RealScalar >::dummy_precision()) |
| Suppress all nonzeros which are smaller than reference under the tolerence epsilon. | |
| template<typename KeepFunc > | |
| void | prune (const KeepFunc &keep=KeepFunc()) |
| Suppress all nonzeros which do not satisfy the predicate keep. | |
| void | resize (Index rows, Index cols) |
| Resizes the matrix to a rows x cols matrix and initializes it to zero. | |
| void | resizeNonZeros (Index size) |
| Low level API Resize the nonzero vector to size. | |
| SparseMatrix () | |
Default constructor yielding an empty 0 x 0 matrix. | |
| SparseMatrix (Index rows, Index cols) | |
Constructs a rows x cols empty matrix. | |
| template<typename OtherDerived > | |
| SparseMatrix (const SparseMatrixBase< OtherDerived > &other) | |
| Constructs a sparse matrix from the sparse expression other. | |
| SparseMatrix (const SparseMatrix &other) | |
| Copy constructor. | |
| void | swap (SparseMatrix &other) |
| Swap the content of two sparse matrices of same type (optimization) | |
| SparseMatrix & | operator= (const SparseMatrix &other) |
| template<typename OtherDerived > | |
| EIGEN_DONT_INLINE SparseMatrix & | operator= (const SparseMatrixBase< OtherDerived > &other) |
| ~SparseMatrix () | |
| Destructor. | |
| Scalar | sum () const |
| Overloaded for performance. | |
| EIGEN_DEPRECATED void | startFill (Index reserveSize=1000) |
| EIGEN_DEPRECATED Scalar & | fillrand (Index row, Index col) |
| EIGEN_DEPRECATED Scalar & | fill (Index row, Index col) |
| EIGEN_DEPRECATED void | endFill () |
Protected Types | |
| typedef SparseMatrix< Scalar,(Flags &~RowMajorBit)|(IsRowMajor?RowMajorBit:0)> | TransposedSparseMatrix |
Protected Attributes | |
| Index | m_outerSize |
| Index | m_innerSize |
| Index * | m_outerIndex |
| CompressedStorage< Scalar, Index > | m_data |
Friends | |
| std::ostream & | operator<< (std::ostream &s, const SparseMatrix &m) |
| typedef MappedSparseMatrix<Scalar,Flags> Eigen::SparseMatrix::Map |
typedef SparseMatrix<Scalar,(Flags&~RowMajorBit)|(IsRowMajor?RowMajorBit:0)> Eigen::SparseMatrix::TransposedSparseMatrix [protected] |
| Eigen::SparseMatrix::SparseMatrix | ( | ) | [inline] |
| Eigen::SparseMatrix::SparseMatrix | ( | const SparseMatrixBase< OtherDerived > & | other | ) | [inline] |
| Eigen::SparseMatrix::SparseMatrix | ( | const SparseMatrix & | other | ) | [inline] |
| const Index* Eigen::SparseMatrix::_innerIndexPtr | ( | ) | const [inline] |
| const Index* Eigen::SparseMatrix::_outerIndexPtr | ( | ) | const [inline] |
| const Scalar* Eigen::SparseMatrix::_valuePtr | ( | ) | const [inline] |
| Index Eigen::SparseMatrix::cols | ( | void | ) | const [inline] |
Reimplemented from Eigen::SparseMatrixBase< SparseMatrix< _Scalar, _Options, _Index > >.
| EIGEN_DEPRECATED void Eigen::SparseMatrix::endFill | ( | ) | [inline] |
| void Eigen::SparseMatrix::finalize | ( | ) | [inline] |
| Index Eigen::SparseMatrix::innerSize | ( | ) | const [inline] |
Reimplemented from Eigen::SparseMatrixBase< SparseMatrix< _Scalar, _Options, _Index > >.
After an insertion session, you should call the finalize() function.
Before filling a given inner vector you must call the statVec(Index) function.
After an insertion session, you should call the finalize() function.
| Index Eigen::SparseMatrix::nonZeros | ( | ) | const [inline] |
Reimplemented from Eigen::SparseMatrixBase< SparseMatrix< _Scalar, _Options, _Index > >.
| SparseMatrix& Eigen::SparseMatrix::operator= | ( | const SparseMatrix & | other | ) | [inline] |
| EIGEN_DONT_INLINE SparseMatrix& Eigen::SparseMatrix::operator= | ( | const SparseMatrixBase< OtherDerived > & | other | ) | [inline] |
Reimplemented from Eigen::SparseMatrixBase< SparseMatrix< _Scalar, _Options, _Index > >.
| Index Eigen::SparseMatrix::outerSize | ( | ) | const [inline] |
Reimplemented from Eigen::SparseMatrixBase< SparseMatrix< _Scalar, _Options, _Index > >.
| void Eigen::SparseMatrix::prune | ( | const KeepFunc & | keep = KeepFunc() | ) | [inline] |
| void Eigen::SparseMatrix::reserve | ( | Index | reserveSize | ) | [inline] |
Resizes the matrix to a rows x cols matrix and initializes it to zero.
| void Eigen::SparseMatrix::resizeNonZeros | ( | Index | size | ) | [inline] |
| Index Eigen::SparseMatrix::rows | ( | void | ) | const [inline] |
Reimplemented from Eigen::SparseMatrixBase< SparseMatrix< _Scalar, _Options, _Index > >.
| void Eigen::SparseMatrix::setZero | ( | ) | [inline] |
| EIGEN_DEPRECATED void Eigen::SparseMatrix::startFill | ( | Index | reserveSize = 1000 | ) | [inline] |
*this.| reserveSize | approximate number of nonzeros Note that the matrix *this is zero-ed. |
| void Eigen::SparseMatrix::startVec | ( | Index | outer | ) | [inline] |
| internal::traits< SparseMatrix< _Scalar, _Options, _Index > >::Scalar Eigen::SparseMatrix::sum | ( | ) | const |
Overloaded for performance.
Reimplemented from Eigen::SparseMatrixBase< SparseMatrix< _Scalar, _Options, _Index > >.
| void Eigen::SparseMatrix::swap | ( | SparseMatrix & | other | ) | [inline] |
| std::ostream& operator<< | ( | std::ostream & | s, |
| const SparseMatrix & | m | ||
| ) | [friend] |
CompressedStorage<Scalar,Index> Eigen::SparseMatrix::m_data [protected] |
Index Eigen::SparseMatrix::m_innerSize [protected] |
Index* Eigen::SparseMatrix::m_outerIndex [protected] |
Index Eigen::SparseMatrix::m_outerSize [protected] |
| Page generated by Doxygen 1.7.5 for MRPT 0.9.5 SVN: at Sun Oct 16 12:16:33 UTC 2011 |