Eigen::SparseView< MatrixType > Class Template Reference

Expression of a dense or sparse matrix with zero or too small values removed. More...

+ Inheritance diagram for Eigen::SparseView< MatrixType >:

Public Types

typedef internal::remove_all_t< MatrixTypeNestedExpression
 
- Public Types inherited from Eigen::SparseMatrixBase< SparseView< MatrixType > >
enum  
 
typedef std::conditional_t< NumTraits< Scalar >::IsComplex, CwiseUnaryOp< internal::scalar_conjugate_op< Scalar >, Eigen::Transpose< const SparseView< MatrixType > > >, Transpose< const SparseView< MatrixType > > > AdjointReturnType
 
typedef Transpose< const SparseView< MatrixType > > ConstTransposeReturnType
 
typedef Matrix< StorageIndex, Dynamic, 1 > IndexVector
 
typedef internal::add_const_on_value_type_if_arithmetic< typename internal::packet_traits< Scalar >::type >::type PacketReturnType
 
typedef internal::packet_traits< Scalar >::type PacketScalar
 
typedef SparseMatrix< Scalar, Flags &RowMajorBit ? RowMajor :ColMajor, StorageIndexPlainObject
 
typedef internal::traits< SparseView< MatrixType > >::Scalar Scalar
 
typedef Matrix< Scalar, Dynamic, 1 > ScalarVector
 
typedef SparseMatrixBase StorageBaseType
 
typedef internal::traits< SparseView< MatrixType > >::StorageIndex StorageIndex
 
typedef internal::traits< SparseView< MatrixType > >::StorageKind StorageKind
 
typedef Transpose< SparseView< MatrixType > > TransposeReturnType
 
typedef Scalar value_type
 
- Public Types inherited from Eigen::EigenBase< SparseView< MatrixType > >
typedef Eigen::Index Index
 The interface type of indices. More...
 
typedef internal::traits< SparseView< MatrixType > >::StorageKind StorageKind
 

Public Member Functions

Index cols () const
 
RealScalar epsilon () const
 
Index innerSize () const
 
const internal::remove_all_t< MatrixTypeNested > & nestedExpression () const
 
Index outerSize () const
 
Scalar reference () const
 
Index rows () const
 
 SparseView (const MatrixType &mat, const Scalar &reference=Scalar(0), const RealScalar &epsilon=NumTraits< Scalar >::dummy_precision())
 
- Public Member Functions inherited from Eigen::SparseMatrixBase< SparseView< MatrixType > >
const AdjointReturnType adjoint () const
 
RealScalar blueNorm () const
 
Index cols () const
 
const SparseMatrixBase< SparseView< MatrixType > >::template CwiseProductDenseReturnType< OtherDerived >::Type cwiseProduct (const MatrixBase< OtherDerived > &other) const
 
const CwiseProductDenseReturnType< OtherDerived >::Type cwiseProduct (const MatrixBase< OtherDerived > &other) const
 
internal::traits< SparseView< MatrixType > >::Scalar dot (const MatrixBase< OtherDerived > &other) const
 
Scalar dot (const MatrixBase< OtherDerived > &other) const
 
internal::traits< SparseView< MatrixType > >::Scalar dot (const SparseMatrixBase< OtherDerived > &other) const
 
Scalar dot (const SparseMatrixBase< OtherDerived > &other) const
 
const internal::eval< SparseView< MatrixType > >::type eval () const
 
Index innerSize () const
 
bool isApprox (const MatrixBase< OtherDerived > &other, const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
 
bool isApprox (const SparseMatrixBase< OtherDerived > &other, const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
 
bool isRValue () const
 
bool isVector () const
 
SparseView< MatrixType > & markAsRValue ()
 
RealScalar norm () const
 
const Product< SparseView< MatrixType >, OtherDerived > operator* (const DiagonalBase< OtherDerived > &other) const
 
const Product< SparseView< MatrixType >, OtherDerived > operator* (const MatrixBase< OtherDerived > &other) const
 
const Product< SparseView< MatrixType >, OtherDerived, AliasFreeProduct > operator* (const SparseMatrixBase< OtherDerived > &other) const
 
SparseView< MatrixType > & operator*= (const Scalar &other)
 
SparseView< MatrixType > & operator*= (const SparseMatrixBase< OtherDerived > &other)
 
SparseView< MatrixType > & operator+= (const DiagonalBase< OtherDerived > &other)
 
SparseView< MatrixType > & operator+= (const EigenBase< OtherDerived > &other)
 
SparseView< MatrixType > & operator+= (const SparseMatrixBase< OtherDerived > &other)
 
SparseView< MatrixType > & operator-= (const DiagonalBase< OtherDerived > &other)
 
SparseView< MatrixType > & operator-= (const EigenBase< OtherDerived > &other)
 
SparseView< MatrixType > & operator-= (const SparseMatrixBase< OtherDerived > &other)
 
SparseView< MatrixType > & operator/= (const Scalar &other)
 
SparseView< MatrixType > & operator= (const EigenBase< OtherDerived > &other)
 
SparseView< MatrixType > & operator= (const ReturnByValue< OtherDerived > &other)
 
SparseView< MatrixType > & operator= (const SparseMatrixBase< OtherDerived > &other)
 
SparseView< MatrixType > & operator= (const SparseView< MatrixType > &other)
 
Index outerSize () const
 
const SparseView< SparseView< MatrixType > > pruned (const Scalar &reference=Scalar(0), const RealScalar &epsilon=NumTraits< Scalar >::dummy_precision()) const
 
Index rows () const
 
SelfAdjointViewReturnType< UpLo >::Type selfadjointView ()
 
SparseMatrixBase< SparseView< MatrixType > >::template SelfAdjointViewReturnType< UpLo >::Type selfadjointView ()
 
ConstSelfAdjointViewReturnType< UpLo >::Type selfadjointView () const
 
SparseMatrixBase< SparseView< MatrixType > >::template ConstSelfAdjointViewReturnType< UpLo >::Type selfadjointView () const
 
Index size () const
 
 SparseMatrixBase ()
 
RealScalar squaredNorm () const
 
Scalar sum () const
 
DenseMatrixType toDense () const
 
TransposeReturnType transpose ()
 
const ConstTransposeReturnType transpose () const
 
const TriangularView< const SparseView< MatrixType >, Mode > triangularView () const
 
SparseSymmetricPermutationProduct< SparseView< MatrixType >, Upper|Lower > twistedBy (const PermutationMatrix< Dynamic, Dynamic, StorageIndex > &perm) const
 
- Public Member Functions inherited from Eigen::EigenBase< SparseView< MatrixType > >
void addTo (Dest &dst) const
 
void applyThisOnTheLeft (Dest &dst) const
 
void applyThisOnTheRight (Dest &dst) const
 
EIGEN_CONSTEXPR Index cols () const EIGEN_NOEXCEPT
 
SparseView< MatrixType > & const_cast_derived () const
 
const SparseView< MatrixType > & const_derived () const
 
SparseView< MatrixType > & derived ()
 
const SparseView< MatrixType > & derived () const
 
void evalTo (Dest &dst) const
 
EIGEN_CONSTEXPR Index rows () const EIGEN_NOEXCEPT
 
EIGEN_CONSTEXPR Index size () const EIGEN_NOEXCEPT
 
void subTo (Dest &dst) const
 

Protected Attributes

RealScalar m_epsilon
 
MatrixTypeNested m_matrix
 
Scalar m_reference
 
- Protected Attributes inherited from Eigen::SparseMatrixBase< SparseView< MatrixType > >
bool m_isRValue
 

Private Types

typedef SparseMatrixBase< SparseViewBase
 
typedef MatrixType::Nested MatrixTypeNested
 
typedef internal::remove_all_t< MatrixTypeNestedMatrixTypeNested_
 

Additional Inherited Members

- Protected Member Functions inherited from Eigen::SparseMatrixBase< SparseView< MatrixType > >
SparseView< MatrixType > & assign (const OtherDerived &other)
 
void assignGeneric (const OtherDerived &other)
 
- Static Protected Member Functions inherited from Eigen::SparseMatrixBase< SparseView< MatrixType > >
static StorageIndex convert_index (const Index idx)
 

Detailed Description

template<typename MatrixType>
class Eigen::SparseView< MatrixType >

Expression of a dense or sparse matrix with zero or too small values removed.

Template Parameters
MatrixTypethe type of the object of which we are removing the small entries

This class represents an expression of a given dense or sparse matrix with entries smaller than reference * epsilon are removed. It is the return type of MatrixBase::sparseView() and SparseMatrixBase::pruned() and most of the time this is the only way it is used.

See also
MatrixBase::sparseView(), SparseMatrixBase::pruned()

Definition at line 47 of file SparseView.h.

Member Typedef Documentation

◆ Base

template<typename MatrixType >
typedef SparseMatrixBase<SparseView > Eigen::SparseView< MatrixType >::Base
private

Definition at line 51 of file SparseView.h.

◆ MatrixTypeNested

template<typename MatrixType >
typedef MatrixType::Nested Eigen::SparseView< MatrixType >::MatrixTypeNested
private

Definition at line 49 of file SparseView.h.

◆ MatrixTypeNested_

template<typename MatrixType >
typedef internal::remove_all_t<MatrixTypeNested> Eigen::SparseView< MatrixType >::MatrixTypeNested_
private

Definition at line 50 of file SparseView.h.

◆ NestedExpression

template<typename MatrixType >
typedef internal::remove_all_t<MatrixType> Eigen::SparseView< MatrixType >::NestedExpression

Definition at line 54 of file SparseView.h.

Constructor & Destructor Documentation

◆ SparseView()

template<typename MatrixType >
Eigen::SparseView< MatrixType >::SparseView ( const MatrixType mat,
const Scalar reference = Scalar(0),
const RealScalar &  epsilon = NumTraits<Scalar>::dummy_precision() 
)
inlineexplicit

Definition at line 56 of file SparseView.h.

Scalar reference() const
Definition: SparseView.h:70
Scalar m_reference
Definition: SparseView.h:75
RealScalar m_epsilon
Definition: SparseView.h:76
MatrixTypeNested m_matrix
Definition: SparseView.h:74
RealScalar epsilon() const
Definition: SparseView.h:71

Member Function Documentation

◆ cols()

template<typename MatrixType >
Index Eigen::SparseView< MatrixType >::cols ( void  ) const
inline

Definition at line 61 of file SparseView.h.

61 { return m_matrix.cols(); }

◆ epsilon()

template<typename MatrixType >
RealScalar Eigen::SparseView< MatrixType >::epsilon ( ) const
inline

Definition at line 71 of file SparseView.h.

71 { return m_epsilon; }

◆ innerSize()

template<typename MatrixType >
Index Eigen::SparseView< MatrixType >::innerSize ( ) const
inline

Definition at line 63 of file SparseView.h.

63 { return m_matrix.innerSize(); }

◆ nestedExpression()

template<typename MatrixType >
const internal::remove_all_t<MatrixTypeNested>& Eigen::SparseView< MatrixType >::nestedExpression ( ) const
inline
Returns
the nested expression

Definition at line 68 of file SparseView.h.

68 { return m_matrix; }

◆ outerSize()

template<typename MatrixType >
Index Eigen::SparseView< MatrixType >::outerSize ( ) const
inline

Definition at line 64 of file SparseView.h.

64 { return m_matrix.outerSize(); }

◆ reference()

template<typename MatrixType >
Scalar Eigen::SparseView< MatrixType >::reference ( ) const
inline

Definition at line 70 of file SparseView.h.

70 { return m_reference; }

◆ rows()

template<typename MatrixType >
Index Eigen::SparseView< MatrixType >::rows ( void  ) const
inline

Definition at line 60 of file SparseView.h.

60 { return m_matrix.rows(); }

Member Data Documentation

◆ m_epsilon

template<typename MatrixType >
RealScalar Eigen::SparseView< MatrixType >::m_epsilon
protected

Definition at line 76 of file SparseView.h.

◆ m_matrix

template<typename MatrixType >
MatrixTypeNested Eigen::SparseView< MatrixType >::m_matrix
protected

Definition at line 74 of file SparseView.h.

◆ m_reference

template<typename MatrixType >
Scalar Eigen::SparseView< MatrixType >::m_reference
protected

Definition at line 75 of file SparseView.h.


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