The main sparse matrix class. More...
Public Member Functions | |
EIGEN_DEPRECATED void | endFill () |
EIGEN_DEPRECATED Scalar & | fill (Index row, Index col) |
EIGEN_DEPRECATED Scalar & | fillrand (Index row, Index col) |
void | finalize () |
EIGEN_DONT_INLINE Scalar & | insert (Index row, Index col) |
Scalar & | insertBack (Index row, Index col) |
Scalar & | insertBackByOuterInner (Index outer, Index inner) |
Scalar & | insertBackByOuterInnerUnordered (Index outer, Index inner) |
Index | nonZeros () const |
void | prune (Scalar reference, RealScalar epsilon=NumTraits< RealScalar >::dummy_precision()) |
template<typename KeepFunc > | |
void | prune (const KeepFunc &keep=KeepFunc()) |
void | reserve (Index reserveSize) |
void | resize (Index rows, Index cols) |
void | resizeNonZeros (Index size) |
void | setZero () |
SparseMatrix () | |
SparseMatrix (Index rows, Index cols) | |
template<typename OtherDerived > | |
SparseMatrix (const SparseMatrixBase< OtherDerived > &other) | |
SparseMatrix (const SparseMatrix &other) | |
EIGEN_DEPRECATED void | startFill (Index reserveSize=1000) |
void | startVec (Index outer) |
Scalar | sum () const |
void | swap (SparseMatrix &other) |
~SparseMatrix () | |
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 Customizing/Extending Eigen by defining the preprocessor symbol EIGEN_SPARSEMATRIX_PLUGIN
.
|
inline |
Default constructor yielding an empty 0
x
0
matrix
|
inline |
Constructs a rows x
cols empty matrix
|
inline |
Constructs a sparse matrix from the sparse expression other
|
inline |
Copy constructor
|
inline |
Destructor
|
inline |
|
inline |
|
inline |
|
inline |
Must be called after inserting a set of non zero entries.
|
inline |
After an insertion session, you should call the finalize() function.
|
inline |
Before filling a given inner vector you must call the statVec(Index) function.
After an insertion session, you should call the finalize() function.
|
inline |
|
inline |
|
inline |
|
inline |
Suppress all nonzeros which are smaller than reference under the tolerence epsilon
|
inline |
Suppress all nonzeros which do not satisfy the predicate keep. The functor type KeepFunc must implement the following function:
|
inline |
Preallocates reserveSize non zeros
|
inline |
Resizes the matrix to a rows x cols matrix and initializes it to zero
|
inline |
Low level API Resize the nonzero vector to size
|
inline |
Removes all non zeros
|
inline |
reserveSize | approximate number of nonzeros Note that the matrix *this is zero-ed. |
|
inline |
internal::traits< SparseMatrix< _Scalar, _Options, _Index > >::Scalar sum | ( | ) | const |
Overloaded for performance
|
inline |
Swap the content of two sparse matrices of same type (optimization)