10 #ifndef EIGEN_SPARSE_CWISE_UNARY_OP_H 11 #define EIGEN_SPARSE_CWISE_UNARY_OP_H 15 template<
typename UnaryOp,
typename MatrixType>
22 class ReverseInnerIterator;
25 EIGEN_SPARSE_PUBLIC_INTERFACE(Derived)
29 typedef typename _MatrixTypeNested::InnerIterator MatrixTypeIterator;
30 typedef typename _MatrixTypeNested::ReverseInnerIterator MatrixTypeReverseIterator;
33 template<
typename UnaryOp,
typename MatrixType>
42 : Base(unaryOp.derived().nestedExpression(),outer), m_functor(unaryOp.derived().functor())
45 EIGEN_STRONG_INLINE InnerIterator& operator++()
46 { Base::operator++();
return *
this; }
51 const UnaryOp m_functor;
56 template<
typename UnaryOp,
typename MatrixType>
58 :
public CwiseUnaryOpImpl<UnaryOp,MatrixType,Sparse>::MatrixTypeReverseIterator
64 EIGEN_STRONG_INLINE ReverseInnerIterator(
const CwiseUnaryOpImpl& unaryOp,
typename CwiseUnaryOpImpl::Index outer)
65 : Base(unaryOp.derived().nestedExpression(),outer), m_functor(unaryOp.derived().functor())
68 EIGEN_STRONG_INLINE ReverseInnerIterator& operator--()
69 { Base::operator--();
return *
this; }
74 const UnaryOp m_functor;
79 template<
typename ViewOp,
typename MatrixType>
86 class ReverseInnerIterator;
89 EIGEN_SPARSE_PUBLIC_INTERFACE(Derived)
93 typedef typename _MatrixTypeNested::InnerIterator MatrixTypeIterator;
94 typedef typename _MatrixTypeNested::ReverseInnerIterator MatrixTypeReverseIterator;
97 template<
typename ViewOp,
typename MatrixType>
106 : Base(unaryOp.derived().nestedExpression(),outer), m_functor(unaryOp.derived().functor())
109 EIGEN_STRONG_INLINE InnerIterator& operator++()
110 { Base::operator++();
return *
this; }
116 const ViewOp m_functor;
119 template<
typename ViewOp,
typename MatrixType>
127 EIGEN_STRONG_INLINE ReverseInnerIterator(
const CwiseUnaryViewImpl& unaryOp,
typename CwiseUnaryViewImpl::Index outer)
128 : Base(unaryOp.derived().nestedExpression(),outer), m_functor(unaryOp.derived().functor())
131 EIGEN_STRONG_INLINE ReverseInnerIterator& operator--()
132 { Base::operator--();
return *
this; }
138 const ViewOp m_functor;
141 template<
typename Derived>
145 for (Index j=0; j<outerSize(); ++j)
146 for (
typename Derived::InnerIterator i(derived(),j); i; ++i)
147 i.valueRef() *= other;
151 template<
typename Derived>
155 for (Index j=0; j<outerSize(); ++j)
156 for (
typename Derived::InnerIterator i(derived(),j); i; ++i)
157 i.valueRef() /= other;
163 #endif // EIGEN_SPARSE_CWISE_UNARY_OP_H Definition: gtest_unittest.cc:5031
iterative scaling algorithm to equilibrate rows and column norms in matrices
Definition: TestIMU_Common.h:87
Definition: CwiseUnaryView.h:56
Generic lvalue expression of a coefficient-wise unary operator of a matrix or a vector.
Definition: CwiseUnaryView.h:59
Base class of any sparse matrices or sparse expressions.
Definition: ForwardDeclarations.h:239
An InnerIterator allows to loop over the element of a sparse (or dense) matrix or expression...
Definition: CwiseUnaryOp.h:56
Generic expression where a coefficient-wise unary operator is applied to an expression.
Definition: CwiseUnaryOp.h:59
Definition: ForwardDeclarations.h:17
double Scalar
Common scalar type.
Definition: FlexibleKalmanBase.h:48