10#ifndef EIGEN_SPARSE_CWISE_UNARY_OP_H
11#define EIGEN_SPARSE_CWISE_UNARY_OP_H
17template<
typename UnaryOp,
typename ArgType>
29 Flags = XprType::Flags
35 EIGEN_INTERNAL_CHECK_COST_VALUE(CoeffReadCost);
38 inline Index nonZerosEstimate()
const {
39 return m_argImpl.nonZerosEstimate();
50template<
typename UnaryOp,
typename ArgType>
52 :
public unary_evaluator<CwiseUnaryOp<UnaryOp,ArgType>, IteratorBased>::EvalIterator
54 typedef typename XprType::Scalar Scalar;
63 { Base::operator++();
return *
this; }
65 EIGEN_STRONG_INLINE Scalar value()
const {
return m_functor(Base::value()); }
100template<
typename ViewOp,
typename ArgType>
108 class ReverseInnerIterator;
112 Flags = XprType::Flags
118 EIGEN_INTERNAL_CHECK_COST_VALUE(CoeffReadCost);
129template<
typename ViewOp,
typename ArgType>
131 :
public unary_evaluator<CwiseUnaryView<ViewOp,ArgType>, IteratorBased>::EvalIterator
133 typedef typename XprType::Scalar Scalar;
142 { Base::operator++();
return *
this; }
144 EIGEN_STRONG_INLINE Scalar value()
const {
return m_functor(Base::value()); }
145 EIGEN_STRONG_INLINE Scalar& valueRef() {
return m_functor(Base::valueRef()); }
176template<
typename Derived>
177EIGEN_STRONG_INLINE Derived&
180 for (Index
j=0;
j<outerSize(); ++
j)
181 for (
typename Derived::InnerIterator i(derived(),
j); i; ++i)
182 i.valueRef() *= other;
186template<
typename Derived>
187EIGEN_STRONG_INLINE Derived&
190 for (Index
j=0;
j<outerSize(); ++
j)
191 for (
typename Derived::InnerIterator i(derived(),
j); i; ++i)
192 i.valueRef() /= other;
Generic expression where a coefficient-wise unary operator is applied to an expression.
Definition CwiseUnaryOp.h:57
Generic lvalue expression of a coefficient-wise unary operator of a matrix or a vector.
Definition CwiseUnaryView.h:60
An InnerIterator allows to loop over the element of any matrix expression.
Definition CoreIterators.h:34
Pseudo expression representing a solving operation.
Definition Solve.h:63
Base class of any sparse matrices or sparse expressions.
Definition SparseMatrixBase.h:34
Definition Constants.h:528
Definition CoreEvaluators.h:101
Definition CoreEvaluators.h:82
Definition XprHelper.h:107
Definition CoreEvaluators.h:56