10 #ifndef EIGEN_SPARSE_CWISE_UNARY_OP_H 11 #define EIGEN_SPARSE_CWISE_UNARY_OP_H 17 template<
typename UnaryOp,
typename ArgType>
28 Flags = XprType::Flags
31 explicit unary_evaluator(
const XprType& op) : m_functor(op.functor()), m_argImpl(op.nestedExpression())
38 return m_argImpl.nonZerosEstimate();
48 template<
typename UnaryOp,
typename ArgType>
57 : Base(unaryOp.m_argImpl,outer), m_functor(unaryOp.m_functor)
61 { Base::operator++();
return *
this; }
71 template<
typename ViewOp,
typename ArgType>
82 Flags = XprType::Flags
85 explicit unary_evaluator(
const XprType& op) : m_functor(op.functor()), m_argImpl(op.nestedExpression())
98 template<
typename ViewOp,
typename ArgType>
107 : Base(unaryOp.m_argImpl,outer), m_functor(unaryOp.m_functor)
111 { Base::operator++();
return *
this; }
122 template<
typename Derived>
129 for (EvalIterator
i(thisEval,
j);
i; ++
i)
130 i.valueRef() *= other;
134 template<
typename Derived>
141 for (EvalIterator
i(thisEval,
j);
i; ++
i)
142 i.valueRef() /= other;
148 #endif // EIGEN_SPARSE_CWISE_UNARY_OP_H
#define EIGEN_STRONG_INLINE
evaluator< ArgType >::InnerIterator EvalIterator
CwiseUnaryOp< UnaryOp, ArgType > XprType
Namespace containing all symbols from the Eigen library.
Eigen::Index Index
The interface type of indices.
evaluator< ArgType >::InnerIterator EvalIterator
unary_evaluator(const XprType &op)
Generic lvalue expression of a coefficient-wise unary operator of a matrix or a vector.
#define EIGEN_INTERNAL_CHECK_COST_VALUE(C)
unary_evaluator(const XprType &op)
EIGEN_STRONG_INLINE InnerIterator(const unary_evaluator &unaryOp, Index outer)
internal::traits< Derived >::Scalar Scalar
unary_evaluator< CwiseUnaryView< ViewOp, ArgType >, IteratorBased >::EvalIterator Base
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
CwiseUnaryView< ViewOp, ArgType > XprType
EIGEN_STRONG_INLINE Scalar value() const
evaluator< ArgType > m_argImpl
Index nonZerosEstimate() const
Derived & operator*=(const Scalar &other)
EIGEN_STRONG_INLINE InnerIterator & operator++()
EIGEN_STRONG_INLINE InnerIterator(const unary_evaluator &unaryOp, Index outer)
Derived & operator/=(const Scalar &other)
EIGEN_STRONG_INLINE InnerIterator & operator++()
evaluator< ArgType > m_argImpl
Generic expression where a coefficient-wise unary operator is applied to an expression.
unary_evaluator< CwiseUnaryOp< UnaryOp, ArgType >, IteratorBased >::EvalIterator Base
EIGEN_STRONG_INLINE Scalar value() const
EIGEN_STRONG_INLINE Scalar & valueRef()
An InnerIterator allows to loop over the element of any matrix expression.