From aaaade4b3d66d67d2c08af3372c3965e7255b2e8 Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Sun, 30 May 2010 16:00:58 -0400 Subject: the Index types change. As discussed on the list (too long to explain here). --- Eigen/src/Core/CwiseUnaryOp.h | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'Eigen/src/Core/CwiseUnaryOp.h') diff --git a/Eigen/src/Core/CwiseUnaryOp.h b/Eigen/src/Core/CwiseUnaryOp.h index 8f95b69b0..da398d131 100644 --- a/Eigen/src/Core/CwiseUnaryOp.h +++ b/Eigen/src/Core/CwiseUnaryOp.h @@ -76,8 +76,8 @@ class CwiseUnaryOp : ei_no_assignment_operator, inline CwiseUnaryOp(const XprType& xpr, const UnaryOp& func = UnaryOp()) : m_xpr(xpr), m_functor(func) {} - EIGEN_STRONG_INLINE int rows() const { return m_xpr.rows(); } - EIGEN_STRONG_INLINE int cols() const { return m_xpr.cols(); } + EIGEN_STRONG_INLINE Index rows() const { return m_xpr.rows(); } + EIGEN_STRONG_INLINE Index cols() const { return m_xpr.cols(); } /** \returns the functor representing the unary operation */ const UnaryOp& functor() const { return m_functor; } @@ -100,32 +100,31 @@ class CwiseUnaryOp : ei_no_assignment_operator, template class CwiseUnaryOpImpl : public ei_dense_xpr_base >::type - { - typedef CwiseUnaryOp Derived; - +{ public: + typedef CwiseUnaryOp Derived; typedef typename ei_dense_xpr_base >::type Base; EIGEN_DENSE_PUBLIC_INTERFACE(Derived) - EIGEN_STRONG_INLINE const Scalar coeff(int row, int col) const + EIGEN_STRONG_INLINE const Scalar coeff(Index row, Index col) const { return derived().functor()(derived().nestedExpression().coeff(row, col)); } template - EIGEN_STRONG_INLINE PacketScalar packet(int row, int col) const + EIGEN_STRONG_INLINE PacketScalar packet(Index row, Index col) const { return derived().functor().packetOp(derived().nestedExpression().template packet(row, col)); } - EIGEN_STRONG_INLINE const Scalar coeff(int index) const + EIGEN_STRONG_INLINE const Scalar coeff(Index index) const { return derived().functor()(derived().nestedExpression().coeff(index)); } template - EIGEN_STRONG_INLINE PacketScalar packet(int index) const + EIGEN_STRONG_INLINE PacketScalar packet(Index index) const { return derived().functor().packetOp(derived().nestedExpression().template packet(index)); } -- cgit v1.2.3