11 #ifndef EIGEN_SPARSEVIEW_H 12 #define EIGEN_SPARSEVIEW_H 18 template<
typename MatrixType>
44 template<
typename MatrixType>
56 : m_matrix(mat), m_reference(reference), m_epsilon(
epsilon) {}
58 inline Index rows()
const {
return m_matrix.rows(); }
59 inline Index cols()
const {
return m_matrix.cols(); }
83 template<
typename ArgType>
97 : EvalIterator(sve.m_argImpl,outer), m_view(sve.m_view)
104 EvalIterator::operator++();
105 incrementToNonZero();
119 EvalIterator::operator++();
126 Flags = XprType::Flags
129 explicit unary_evaluator(
const XprType& xpr) : m_argImpl(xpr.nestedExpression()), m_view(xpr) {}
136 template<
typename ArgType>
153 : m_sve(sve), m_inner(0), m_outer(outer), m_end(sve.m_view.innerSize())
155 incrementToNonZero();
161 incrementToNonZero();
167 return (IsRowMajor) ? m_sve.m_argImpl.coeff(m_outer, m_inner)
168 : m_sve.m_argImpl.coeff(m_inner, m_outer);
172 inline Index row()
const {
return IsRowMajor ? m_outer : index(); }
173 inline Index col()
const {
return IsRowMajor ? index() : m_outer; }
195 Flags = XprType::Flags
198 explicit unary_evaluator(
const XprType& xpr) : m_argImpl(xpr.nestedExpression()), m_view(xpr) {}
224 template<
typename Derived>
243 template<
typename Derived>
evaluator< ArgType >::InnerIterator EvalIterator
SparseMatrixBase< SparseView > Base
EIGEN_STRONG_INLINE InnerIterator(const unary_evaluator &sve, Index outer)
unary_evaluator(const XprType &xpr)
#define EIGEN_STRONG_INLINE
EIGEN_DEVICE_FUNC bool isMuchSmallerThan(const Scalar &x, const OtherScalar &y, const typename NumTraits< Scalar >::Real &precision=NumTraits< Scalar >::dummy_precision())
internal::traits< Derived >::Scalar Scalar
EIGEN_STRONG_INLINE InnerIterator(const unary_evaluator &sve, Index outer)
SparseView< ArgType > XprType
const unary_evaluator & m_sve
Namespace containing all symbols from the Eigen library.
MatrixType::StorageIndex StorageIndex
Holds information about the various numeric (i.e. scalar) types allowed by Eigen. ...
const SparseView< Derived > pruned(const Scalar &reference=Scalar(0), const RealScalar &epsilon=NumTraits< Scalar >::dummy_precision()) const
evaluator< ArgType > m_argImpl
EIGEN_STRONG_INLINE StorageIndex index() const
Eigen::Index Index
The interface type of indices.
const unsigned int RowMajorBit
internal::traits< SparseView< MatrixType > >::StorageIndex StorageIndex
#define EIGEN_SPARSE_PUBLIC_INTERFACE(Derived)
XprType::StorageIndex StorageIndex
Base class of any sparse matrices or sparse expressions.
void incrementToNonZero()
MatrixType::Nested MatrixTypeNested
internal::remove_all< MatrixTypeNested >::type _MatrixTypeNested
MatrixTypeNested m_matrix
internal::traits< SparseView< MatrixType > >::Scalar Scalar
void incrementToNonZero()
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Expression of a dense or sparse matrix with zero or too small values removed.
const SparseView< Derived > sparseView(const Scalar &m_reference=Scalar(0), const typename NumTraits< Scalar >::Real &m_epsilon=NumTraits< Scalar >::dummy_precision()) const
unary_evaluator(const XprType &xpr)
SparseView< ArgType > XprType
EIGEN_STRONG_INLINE Scalar value() const
const internal::remove_all< MatrixTypeNested >::type & nestedExpression() const
NumTraits< Scalar >::Real RealScalar
EIGEN_STRONG_INLINE InnerIterator & operator++()
RealScalar epsilon() const
evaluator< ArgType > m_argImpl
EIGEN_STRONG_INLINE InnerIterator & operator++()
An InnerIterator allows to loop over the element of any matrix expression.