template<typename MatrixType>
Eigen::SparseView class

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

Template parameters
MatrixType the 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.

Base classes

template<typename Derived>
class SparseMatrixBase
Base class of any sparse matrices or sparse expressions.

Public types

using NestedExpression = internal::remove_all<MatrixType>::type

Constructors, destructors, conversion operators

SparseView(const MatrixType& mat, const Scalar& reference = Scalar(0), const RealScalar& epsilon = NumTraits<Scalar>::dummy_precision()) explicit

Public functions

auto cols() const -> Index
auto epsilon() const -> RealScalar
auto innerSize() const -> Index
auto nestedExpression() const -> const internal::remove_all<MatrixTypeNested>::type&
auto outerSize() const -> Index
auto reference() const -> Scalar
auto rows() const -> Index

Protected variables

RealScalar m_epsilon
MatrixTypeNested m_matrix
Scalar m_reference

Typedef documentation

template<typename MatrixType>
typedef internal::remove_all<MatrixType>::type Eigen::SparseView<MatrixType>::NestedExpression

Function documentation

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

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

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

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

template<typename MatrixType>
const internal::remove_all<MatrixTypeNested>::type& Eigen::SparseView<MatrixType>::nestedExpression() const

Returns the nested expression

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

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

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

Variable documentation

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

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

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