11 #ifndef EIGEN_SPARSEVIEW_H
12 #define EIGEN_SPARSEVIEW_H
21 template <
typename MatrixType>
44 template <
typename MatrixType>
82 template <
typename ArgType>
95 :
EvalIterator(sve.m_argImpl, outer), m_view(sve.m_view) {
101 incrementToNonZero();
127 template <
typename ArgType>
141 : m_sve(sve), m_inner(0), m_outer(outer), m_end(sve.m_view.innerSize()) {
142 incrementToNonZero();
147 incrementToNonZero();
152 return (IsRowMajor) ? m_sve.m_argImpl.coeff(m_outer, m_inner) : m_sve.m_argImpl.coeff(m_inner, m_outer);
156 inline Index row()
const {
return IsRowMajor ? m_outer : index(); }
157 inline Index col()
const {
return IsRowMajor ? index() : m_outer; }
200 template <
typename Derived>
218 template <
typename Derived>
#define EIGEN_STRONG_INLINE
Definition: Macros.h:834
#define EIGEN_SPARSE_PUBLIC_INTERFACE(Derived)
Definition: SparseUtil.h:39
MatrixXf MatrixType
Definition: benchmark-blocking-sizes.cpp:52
internal::traits< Derived >::Scalar Scalar
Definition: DenseBase.h:62
An InnerIterator allows to loop over the element of any matrix expression.
Definition: CoreIterators.h:37
Base class of any sparse matrices or sparse expressions.
Definition: SparseMatrixBase.h:30
internal::traits< SparseView< MatrixType > >::StorageIndex StorageIndex
Definition: SparseMatrixBase.h:44
internal::traits< SparseView< MatrixType > >::Scalar Scalar
Definition: SparseMatrixBase.h:32
NumTraits< Scalar >::Real RealScalar
Definition: SparseMatrixBase.h:128
const SparseView< Derived > pruned(const Scalar &reference=Scalar(0), const RealScalar &epsilon=NumTraits< Scalar >::dummy_precision()) const
Definition: SparseView.h:219
Expression of a dense or sparse matrix with zero or too small values removed.
Definition: SparseView.h:45
SparseMatrixBase< SparseView > Base
Definition: SparseView.h:48
internal::remove_all_t< MatrixType > NestedExpression
Definition: SparseView.h:52
Scalar reference() const
Definition: SparseView.h:67
MatrixType::Nested MatrixTypeNested
Definition: SparseView.h:46
Scalar m_reference
Definition: SparseView.h:72
const internal::remove_all_t< MatrixTypeNested > & nestedExpression() const
Definition: SparseView.h:65
internal::remove_all_t< MatrixTypeNested > MatrixTypeNested_
Definition: SparseView.h:47
Index outerSize() const
Definition: SparseView.h:62
Index innerSize() const
Definition: SparseView.h:61
RealScalar m_epsilon
Definition: SparseView.h:73
Index cols() const
Definition: SparseView.h:59
Index rows() const
Definition: SparseView.h:58
MatrixTypeNested m_matrix
Definition: SparseView.h:71
RealScalar epsilon() const
Definition: SparseView.h:68
EIGEN_STRONG_INLINE InnerIterator & operator++()
Definition: SparseView.h:145
Index m_inner
Definition: SparseView.h:163
const unary_evaluator & m_sve
Definition: SparseView.h:162
const Index m_outer
Definition: SparseView.h:164
Index col() const
Definition: SparseView.h:157
Index row() const
Definition: SparseView.h:156
EIGEN_STRONG_INLINE Scalar value() const
Definition: SparseView.h:151
void incrementToNonZero()
Definition: SparseView.h:168
EIGEN_STRONG_INLINE StorageIndex index() const
Definition: SparseView.h:155
const Index m_end
Definition: SparseView.h:165
EIGEN_STRONG_INLINE InnerIterator(const unary_evaluator &sve, Index outer)
Definition: SparseView.h:140
const XprType & m_view
Definition: SparseView.h:108
EIGEN_STRONG_INLINE InnerIterator & operator++()
Definition: SparseView.h:99
XprType::Scalar Scalar
Definition: SparseView.h:91
EIGEN_STRONG_INLINE InnerIterator(const unary_evaluator &sve, Index outer)
Definition: SparseView.h:94
void incrementToNonZero()
Definition: SparseView.h:111
const SparseView< Derived > sparseView(const Scalar &m_reference=Scalar(0), const typename NumTraits< Scalar >::Real &m_epsilon=NumTraits< Scalar >::dummy_precision()) const
Definition: SparseView.h:201
const unsigned int RowMajorBit
Definition: Constants.h:70
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 operator++(bfloat16 &a)
Definition: BFloat16.h:307
EIGEN_DEVICE_FUNC bool isMuchSmallerThan(const Scalar &x, const OtherScalar &y, const typename NumTraits< Scalar >::Real &precision=NumTraits< Scalar >::dummy_precision())
Definition: MathFunctions.h:1916
typename remove_all< T >::type remove_all_t
Definition: Meta.h:142
Namespace containing all symbols from the Eigen library.
Definition: bench_norm.cpp:70
squared absolute value
Definition: GlobalFunctions.h:87
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:83
Extend namespace for flags.
Definition: fsi_chan_precond_driver.cc:56
Definition: Eigen_Colamd.h:49
double epsilon
Definition: osc_ring_sarah_asymptotics.h:43
Eigen::Index Index
The interface type of indices.
Definition: EigenBase.h:43
Holds information about the various numeric (i.e. scalar) types allowed by Eigen.
Definition: NumTraits.h:217
Definition: Constants.h:522
Definition: Constants.h:577
Definition: Constants.h:580
Definition: CoreEvaluators.h:118
Definition: CoreEvaluators.h:104
MatrixType::StorageIndex StorageIndex
Definition: SparseView.h:23
Sparse StorageKind
Definition: SparseView.h:24
Definition: ForwardDeclarations.h:21
const XprType & m_view
Definition: SparseView.h:181
XprType::StorageIndex StorageIndex
Definition: SparseView.h:135
evaluator< ArgType > m_argImpl
Definition: SparseView.h:180
XprType::Scalar Scalar
Definition: SparseView.h:134
SparseView< ArgType > XprType
Definition: SparseView.h:130
unary_evaluator(const XprType &xpr)
Definition: SparseView.h:177
const XprType & m_view
Definition: SparseView.h:124
evaluator< ArgType > m_argImpl
Definition: SparseView.h:123
SparseView< ArgType > XprType
Definition: SparseView.h:87
evaluator< ArgType >::InnerIterator EvalIterator
Definition: SparseView.h:84
unary_evaluator(const XprType &xpr)
Definition: SparseView.h:120
Definition: CoreEvaluators.h:82