W3cubDocs

/Eigen3

Eigen::DynamicSparseMatrix

template<typename _Scalar, int _Options, typename _StorageIndex>
class Eigen::DynamicSparseMatrix< _Scalar, _Options, _StorageIndex >

A sparse matrix class designed for matrix assembly purpose.

Deprecated:
use a SparseMatrix in an uncompressed mode
Parameters
_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.

See also
SparseMatrix
Scalar coeff (Index row, Index col) const
Scalar & coeffRef (Index row, Index col)
EIGEN_DEPRECATED DynamicSparseMatrix ()
template<typename OtherDerived >
EIGEN_DEPRECATED DynamicSparseMatrix (const SparseMatrixBase< OtherDerived > &other)
EIGEN_DEPRECATED DynamicSparseMatrix (Index rows, Index cols)
EIGEN_DEPRECATED void endFill ()
EIGEN_DEPRECATED Scalar & fill (Index row, Index col)
EIGEN_DEPRECATED Scalar & fillrand (Index row, Index col)
void finalize ()
Scalar & insertBack (Index row, Index col)
Scalar & insertBackByOuterInner (Index outer, Index inner)
Index nonZeros () const
void prune (Scalar reference, RealScalar epsilon=NumTraits< RealScalar >::dummy_precision())
void resize (Index rows, Index cols)
EIGEN_DEPRECATED void startFill (Index reserveSize=1000)
void startVec (Index)
~DynamicSparseMatrix ()

DynamicSparseMatrix() [1/3]

template<typename _Scalar , int _Options, typename _StorageIndex >
EIGEN_DEPRECATED Eigen::DynamicSparseMatrix< _Scalar, _Options, _StorageIndex >::DynamicSparseMatrix ( )
inline

The class DynamicSparseMatrix is deprecated

DynamicSparseMatrix() [2/3]

template<typename _Scalar , int _Options, typename _StorageIndex >
EIGEN_DEPRECATED Eigen::DynamicSparseMatrix< _Scalar, _Options, _StorageIndex >::DynamicSparseMatrix ( Index rows,
Index cols
)
inline

The class DynamicSparseMatrix is deprecated

DynamicSparseMatrix() [3/3]

template<typename _Scalar , int _Options, typename _StorageIndex >
template<typename OtherDerived >
EIGEN_DEPRECATED Eigen::DynamicSparseMatrix< _Scalar, _Options, _StorageIndex >::DynamicSparseMatrix ( const SparseMatrixBase< OtherDerived > & other )
inlineexplicit

The class DynamicSparseMatrix is deprecated

~DynamicSparseMatrix()

template<typename _Scalar , int _Options, typename _StorageIndex >
Eigen::DynamicSparseMatrix< _Scalar, _Options, _StorageIndex >::~DynamicSparseMatrix ( )
inline

Destructor

coeff()

template<typename _Scalar , int _Options, typename _StorageIndex >
Scalar Eigen::DynamicSparseMatrix< _Scalar, _Options, _StorageIndex >::coeff ( Index row,
Index col
) const
inline
Returns
the coefficient value at given position row, col This operation involes a log(rho*outer_size) binary search.

coeffRef()

template<typename _Scalar , int _Options, typename _StorageIndex >
Scalar& Eigen::DynamicSparseMatrix< _Scalar, _Options, _StorageIndex >::coeffRef ( Index row,
Index col
)
inline
Returns
a reference to the coefficient value at given position row, col This operation involes a log(rho*outer_size) binary search. If the coefficient does not exist yet, then a sorted insertion into a sequential buffer is performed.

endFill()

template<typename _Scalar , int _Options, typename _StorageIndex >
EIGEN_DEPRECATED void Eigen::DynamicSparseMatrix< _Scalar, _Options, _StorageIndex >::endFill ( )
inline
Deprecated:
use finalize() Does nothing. Provided for compatibility with SparseMatrix.

fill()

template<typename _Scalar , int _Options, typename _StorageIndex >
EIGEN_DEPRECATED Scalar& Eigen::DynamicSparseMatrix< _Scalar, _Options, _StorageIndex >::fill ( Index row,
Index col
)
inline
Deprecated:
use insert() inserts a nonzero coefficient at given coordinates row, col and returns its reference assuming that: 1 - the coefficient does not exist yet 2 - this the coefficient with greater inner coordinate for the given outer coordinate. 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.
See also
fillrand(), coeffRef()

fillrand()

template<typename _Scalar , int _Options, typename _StorageIndex >
EIGEN_DEPRECATED Scalar& Eigen::DynamicSparseMatrix< _Scalar, _Options, _StorageIndex >::fillrand ( Index row,
Index col
)
inline
Deprecated:
use insert() Like fill() but with random inner coordinates. Compared to the generic coeffRef(), the unique limitation is that we assume the coefficient does not exist yet.

finalize()

template<typename _Scalar , int _Options, typename _StorageIndex >
void Eigen::DynamicSparseMatrix< _Scalar, _Options, _StorageIndex >::finalize ( )
inline

Does nothing: provided for compatibility with SparseMatrix

insertBack()

template<typename _Scalar , int _Options, typename _StorageIndex >
Scalar& Eigen::DynamicSparseMatrix< _Scalar, _Options, _StorageIndex >::insertBack ( Index row,
Index col
)
inline
Returns
a reference to the non zero coefficient at position row, col assuming that:
  • the nonzero does not already exist
  • the new coefficient is the last one of the given inner vector.
See also
insert, insertBackByOuterInner

insertBackByOuterInner()

template<typename _Scalar , int _Options, typename _StorageIndex >
Scalar& Eigen::DynamicSparseMatrix< _Scalar, _Options, _StorageIndex >::insertBackByOuterInner ( Index outer,
Index inner
)
inline
See also
insertBack

nonZeros()

template<typename _Scalar , int _Options, typename _StorageIndex >
Index Eigen::DynamicSparseMatrix< _Scalar, _Options, _StorageIndex >::nonZeros ( ) const
inline
Returns
the number of non zero coefficients

prune()

template<typename _Scalar , int _Options, typename _StorageIndex >
void Eigen::DynamicSparseMatrix< _Scalar, _Options, _StorageIndex >::prune ( Scalar reference,
RealScalar epsilon = NumTraits<RealScalar>::dummy_precision()
)
inline

Suppress all nonzeros which are smaller than reference under the tolerance epsilon

resize()

template<typename _Scalar , int _Options, typename _StorageIndex >
void Eigen::DynamicSparseMatrix< _Scalar, _Options, _StorageIndex >::resize ( Index rows,
Index cols
)
inline

Resize the matrix without preserving the data (the matrix is set to zero)

startFill()

template<typename _Scalar , int _Options, typename _StorageIndex >
EIGEN_DEPRECATED void Eigen::DynamicSparseMatrix< _Scalar, _Options, _StorageIndex >::startFill ( Index reserveSize = 1000 )
inline
Deprecated:
Set the matrix to zero and reserve the memory for reserveSize nonzero coefficients.

startVec()

template<typename _Scalar , int _Options, typename _StorageIndex >
void Eigen::DynamicSparseMatrix< _Scalar, _Options, _StorageIndex >::startVec ( Index )
inline

Does nothing: provided for compatibility with SparseMatrix


The documentation for this class was generated from the following file: