diff options
author | Benoit Jacob <jacob.benoit.1@gmail.com> | 2010-05-30 16:00:58 -0400 |
---|---|---|
committer | Benoit Jacob <jacob.benoit.1@gmail.com> | 2010-05-30 16:00:58 -0400 |
commit | aaaade4b3d66d67d2c08af3372c3965e7255b2e8 (patch) | |
tree | 76dfaefb014333b2f98c6db660454771655ea8b7 /Eigen/src/Core/CwiseUnaryView.h | |
parent | faa3ff3be6a02b57c6cb05edc87375e54ab96606 (diff) |
the Index types change.
As discussed on the list (too long to explain here).
Diffstat (limited to 'Eigen/src/Core/CwiseUnaryView.h')
-rw-r--r-- | Eigen/src/Core/CwiseUnaryView.h | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/Eigen/src/Core/CwiseUnaryView.h b/Eigen/src/Core/CwiseUnaryView.h index 9cdd03477..11a23c66a 100644 --- a/Eigen/src/Core/CwiseUnaryView.h +++ b/Eigen/src/Core/CwiseUnaryView.h @@ -74,8 +74,8 @@ class CwiseUnaryView : ei_no_assignment_operator, EIGEN_INHERIT_ASSIGNMENT_OPERATORS(CwiseUnaryView) - EIGEN_STRONG_INLINE int rows() const { return m_matrix.rows(); } - EIGEN_STRONG_INLINE int cols() const { return m_matrix.cols(); } + EIGEN_STRONG_INLINE Index rows() const { return m_matrix.rows(); } + EIGEN_STRONG_INLINE Index cols() const { return m_matrix.cols(); } /** \returns the functor representing unary operation */ const ViewOp& functor() const { return m_functor; } @@ -98,40 +98,39 @@ template<typename ViewOp, typename MatrixType> class CwiseUnaryViewImpl<ViewOp,MatrixType,Dense> : public ei_dense_xpr_base< CwiseUnaryView<ViewOp, MatrixType> >::type { - typedef CwiseUnaryView<ViewOp, MatrixType> Derived; - public: + typedef CwiseUnaryView<ViewOp, MatrixType> Derived; typedef typename ei_dense_xpr_base< CwiseUnaryView<ViewOp, MatrixType> >::type Base; - inline int innerStride() const + EIGEN_DENSE_PUBLIC_INTERFACE(Derived) + + inline Index innerStride() const { return derived().nestedExpression().innerStride() * sizeof(typename ei_traits<MatrixType>::Scalar) / sizeof(Scalar); } - inline int outerStride() const + inline Index outerStride() const { return derived().nestedExpression().outerStride(); } - EIGEN_DENSE_PUBLIC_INTERFACE(Derived) - - EIGEN_STRONG_INLINE CoeffReturnType coeff(int row, int col) const + EIGEN_STRONG_INLINE CoeffReturnType coeff(Index row, Index col) const { return derived().functor()(derived().nestedExpression().coeff(row, col)); } - EIGEN_STRONG_INLINE CoeffReturnType coeff(int index) const + EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const { return derived().functor()(derived().nestedExpression().coeff(index)); } - EIGEN_STRONG_INLINE Scalar& coeffRef(int row, int col) + EIGEN_STRONG_INLINE Scalar& coeffRef(Index row, Index col) { return derived().functor()(const_cast_derived().nestedExpression().coeffRef(row, col)); } - EIGEN_STRONG_INLINE Scalar& coeffRef(int index) + EIGEN_STRONG_INLINE Scalar& coeffRef(Index index) { return derived().functor()(const_cast_derived().nestedExpression().coeffRef(index)); } |