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>
98 : EvalIterator(sve.m_argImpl,outer), m_view(sve.m_view)
100 incrementToNonZero();
106 incrementToNonZero();
127 Flags = XprType::Flags
130 explicit unary_evaluator(
const XprType& xpr) : m_argImpl(xpr.nestedExpression()), m_view(xpr) {}
137 template<
typename ArgType>
154 : m_sve(sve), m_inner(0), m_outer(outer), m_end(sve.m_view.innerSize())
156 incrementToNonZero();
162 incrementToNonZero();
168 return (IsRowMajor) ? m_sve.m_argImpl.coeff(m_outer, m_inner)
169 : m_sve.m_argImpl.coeff(m_inner, m_outer);
173 inline Index row()
const {
return IsRowMajor ? m_outer : index(); }
174 inline Index col()
const {
return IsRowMajor ? index() : m_outer; }
196 Flags = XprType::Flags
199 explicit unary_evaluator(
const XprType& xpr) : m_argImpl(xpr.nestedExpression()), m_view(xpr) {}
225 template<
typename Derived>
244 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 StorageIndex index() const
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. ...
evaluator< ArgType > m_argImpl
Eigen::Index Index
The interface type of indices.
const unsigned int RowMajorBit
const SparseView< Derived > pruned(const Scalar &reference=Scalar(0), const RealScalar &epsilon=NumTraits< Scalar >::dummy_precision()) const
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.
unary_evaluator(const XprType &xpr)
SparseView< ArgType > XprType
const SparseView< Derived > sparseView(const Scalar &m_reference=Scalar(0), const typename NumTraits< Scalar >::Real &m_epsilon=NumTraits< Scalar >::dummy_precision()) const
RealScalar epsilon() const
NumTraits< Scalar >::Real RealScalar
EIGEN_STRONG_INLINE InnerIterator & operator++()
evaluator< ArgType > m_argImpl
const internal::remove_all< MatrixTypeNested >::type & nestedExpression() const
EIGEN_STRONG_INLINE InnerIterator & operator++()
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 operator++(bfloat16 &a)
EIGEN_STRONG_INLINE Scalar value() const
An InnerIterator allows to loop over the element of any matrix expression.