Eigen  3.2.10
 
Loading...
Searching...
No Matches
SparseCore_Module

Detailed Description

Classes

class  SparseMatrix< _Scalar, _Options, _Index >
 A versatible sparse matrix representation. More...
 
class  SparseMatrixBase< Derived >
 Base class of any sparse matrices or sparse expressions. More...
 
class  SparseSelfAdjointView< MatrixType, UpLo >
 Pseudo expression to manipulate a triangular sparse matrix as a selfadjoint matrix. More...
 
class  SparseVector< _Scalar, _Options, _Index >
 a sparse vector class More...
 
class  SparseView< MatrixType >
 Expression of a dense or sparse matrix with zero or too small values removed. More...
 
class  Triplet< Scalar, Index >
 A small structure to hold a non zero as a triplet (i,j,value). More...
 

Functions

const SparseView< Derived > sparseView (const Scalar &m_reference=Scalar(0), const typename NumTraits< Scalar >::Real &m_epsilon=NumTraits< Scalar >::dummy_precision()) const
 

Function Documentation

◆ sparseView()

template<typename Derived>
const SparseView< Derived > sparseView ( const Scalar & m_reference = Scalar(0),
const typename NumTraits< Scalar >::Real & m_epsilon = NumTraits<Scalar>::dummy_precision() ) const
Returns
a sparse expression of the dense expression *this with values smaller than reference * epsilon removed.

This method is typically used when prototyping to convert a quickly assembled dense Matrix D to a SparseMatrix S:

MatrixXd D(n,m);
S = D.sparseView(); // suppress numerical zeros (exact)
S = D.sparseView(reference);
S = D.sparseView(reference,epsilon);
A versatible sparse matrix representation.
Definition SparseMatrix.h:87

where reference is a meaningful non zero reference value, and epsilon is a tolerance factor defaulting to NumTraits<Scalar>::dummy_precision().

See also
SparseMatrixBase::pruned(), class SparseView