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
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;
58 :
Base(unaryOp.m_argImpl,outer), m_functor(unaryOp.m_functor)
72template<
typename ViewOp,
typename ArgType>
83 Flags = XprType::Flags
99template<
typename ViewOp,
typename ArgType>
101 :
public unary_evaluator<CwiseUnaryView<ViewOp,ArgType>, IteratorBased>::EvalIterator
109 :
Base(unaryOp.m_argImpl,outer), m_functor(unaryOp.m_functor)
124template<
typename Derived>
130 for (
Index j=0; j<outerSize(); ++j)
131 for (EvalIterator i(thisEval,j); i; ++i)
132 i.valueRef() *= other;
136template<
typename Derived>
142 for (
Index j=0; j<outerSize(); ++j)
143 for (EvalIterator i(thisEval,j); i; ++i)
144 i.valueRef() /= other;
#define EIGEN_STRONG_INLINE
Definition: Macros.h:927
#define EIGEN_INTERNAL_CHECK_COST_VALUE(C)
Definition: StaticAssert.h:218
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
An InnerIterator allows to loop over the element of any matrix expression.
Definition: CoreIterators.h:34
internal::traits< Derived >::Scalar Scalar
Definition: SparseMatrixBase.h:31
Derived & operator*=(const Scalar &other)
Definition: SparseCwiseUnaryOp.h:126
Derived & operator/=(const Scalar &other)
Definition: SparseCwiseUnaryOp.h:138
const UnaryOp m_functor
Definition: SparseCwiseUnaryOp.h:67
EIGEN_STRONG_INLINE InnerIterator(const unary_evaluator &unaryOp, Index outer)
Definition: SparseCwiseUnaryOp.h:57
EIGEN_STRONG_INLINE InnerIterator & operator++()
Definition: SparseCwiseUnaryOp.h:61
EIGEN_STRONG_INLINE Scalar value() const
Definition: SparseCwiseUnaryOp.h:64
unary_evaluator< CwiseUnaryOp< UnaryOp, ArgType >, IteratorBased >::EvalIterator Base
Definition: SparseCwiseUnaryOp.h:54
XprType::Scalar Scalar
Definition: SparseCwiseUnaryOp.h:53
unary_evaluator< CwiseUnaryView< ViewOp, ArgType >, IteratorBased >::EvalIterator Base
Definition: SparseCwiseUnaryOp.h:105
EIGEN_STRONG_INLINE InnerIterator(const unary_evaluator &unaryOp, Index outer)
Definition: SparseCwiseUnaryOp.h:108
XprType::Scalar Scalar
Definition: SparseCwiseUnaryOp.h:104
EIGEN_STRONG_INLINE Scalar value() const
Definition: SparseCwiseUnaryOp.h:115
const ViewOp m_functor
Definition: SparseCwiseUnaryOp.h:119
EIGEN_STRONG_INLINE InnerIterator & operator++()
Definition: SparseCwiseUnaryOp.h:112
EIGEN_STRONG_INLINE Scalar & valueRef()
Definition: SparseCwiseUnaryOp.h:116
Namespace containing all symbols from the Eigen library.
Definition: Core:141
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:74
Definition: Eigen_Colamd.h:50
unit_t< Units, T, NonLinearScale > & operator++(unit_t< Units, T, NonLinearScale > &u) noexcept
Definition: base.h:2346
Eigen::Index Index
The interface type of indices.
Definition: EigenBase.h:39
Definition: Constants.h:545
Definition: CoreEvaluators.h:111
Definition: CoreEvaluators.h:91
Definition: XprHelper.h:176
unary_evaluator(const XprType &op)
Definition: SparseCwiseUnaryOp.h:31
evaluator< ArgType > m_argImpl
Definition: SparseCwiseUnaryOp.h:45
Index nonZerosEstimate() const
Definition: SparseCwiseUnaryOp.h:37
CwiseUnaryOp< UnaryOp, ArgType > XprType
Definition: SparseCwiseUnaryOp.h:22
const UnaryOp m_functor
Definition: SparseCwiseUnaryOp.h:44
evaluator< ArgType >::InnerIterator EvalIterator
Definition: SparseCwiseUnaryOp.h:42
unary_evaluator(const XprType &op)
Definition: SparseCwiseUnaryOp.h:86
evaluator< ArgType > m_argImpl
Definition: SparseCwiseUnaryOp.h:96
const ViewOp m_functor
Definition: SparseCwiseUnaryOp.h:95
CwiseUnaryView< ViewOp, ArgType > XprType
Definition: SparseCwiseUnaryOp.h:77
evaluator< ArgType >::InnerIterator EvalIterator
Definition: SparseCwiseUnaryOp.h:93
Definition: CoreEvaluators.h:65