10#ifndef EIGEN_SPARSE_CWISE_UNARY_OP_H
11#define EIGEN_SPARSE_CWISE_UNARY_OP_H
17template<
typename UnaryOp,
typename ArgType>
28 Flags = XprType::Flags
34 EIGEN_INTERNAL_CHECK_COST_VALUE(CoeffReadCost);
37 inline Index nonZerosEstimate()
const {
38 return m_argImpl.nonZerosEstimate();
48template<
typename UnaryOp,
typename ArgType>
50 :
public unary_evaluator<CwiseUnaryOp<UnaryOp,ArgType>, IteratorBased>::EvalIterator
53 typedef typename XprType::Scalar Scalar;
62 { Base::operator++();
return *
this; }
64 EIGEN_STRONG_INLINE Scalar value()
const {
return m_functor(Base::value()); }
72template<
typename ViewOp,
typename ArgType>
83 Flags = XprType::Flags
89 EIGEN_INTERNAL_CHECK_COST_VALUE(CoeffReadCost);
99template<
typename ViewOp,
typename ArgType>
101 :
public unary_evaluator<CwiseUnaryView<ViewOp,ArgType>, IteratorBased>::EvalIterator
104 typedef typename XprType::Scalar Scalar;
113 { Base::operator++();
return *
this; }
115 EIGEN_STRONG_INLINE Scalar value()
const {
return m_functor(Base::value()); }
116 EIGEN_STRONG_INLINE Scalar& valueRef() {
return m_functor(Base::valueRef()); }
124template<
typename Derived>
125EIGEN_STRONG_INLINE Derived&
131 for (EvalIterator i(
thisEval,j); i; ++i)
132 i.valueRef() *= other;
136template<
typename Derived>
137EIGEN_STRONG_INLINE Derived&
143 for (EvalIterator i(
thisEval,j); i; ++i)
144 i.valueRef() /= other;
Generic expression where a coefficient-wise unary operator is applied to an expression.
Definition CwiseUnaryOp.h:56
Generic lvalue expression of a coefficient-wise unary operator of a matrix or a vector.
Definition CwiseUnaryView.h:59
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index outerSize() const
Definition DenseBase.h:223
An InnerIterator allows to loop over the element of any matrix expression.
Definition CoreIterators.h:34
Base class for all dense matrices, vectors, and expressions.
Definition MatrixBase.h:50
Base class of any sparse matrices or sparse expressions.
Definition SparseMatrixBase.h:28
Namespace containing all symbols from the Eigen library.
Definition LDLT.h:16
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition Meta.h:74
Definition Constants.h:545
Definition CoreEvaluators.h:111
Definition CoreEvaluators.h:91
Definition XprHelper.h:176
Definition CoreEvaluators.h:65