From fc202bab398ed9b78ef8452f8e4ef35e233965f6 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Fri, 13 Feb 2015 18:57:41 +0100 Subject: Index refactoring: StorageIndex must be used for storage only (and locally when it make sense). In all other cases use the global Index type. --- Eigen/src/Core/EigenBase.h | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'Eigen/src/Core/EigenBase.h') diff --git a/Eigen/src/Core/EigenBase.h b/Eigen/src/Core/EigenBase.h index c98ca467a..79dabda37 100644 --- a/Eigen/src/Core/EigenBase.h +++ b/Eigen/src/Core/EigenBase.h @@ -13,7 +13,9 @@ namespace Eigen { -/** Common base class for all classes T such that MatrixBase has an operator=(T) and a constructor MatrixBase(T). +/** \class EigenBase + * + * Common base class for all classes T such that MatrixBase has an operator=(T) and a constructor MatrixBase(T). * * In other words, an EigenBase object is an object that can be copied into a MatrixBase. * @@ -26,9 +28,16 @@ namespace Eigen { template struct EigenBase { // typedef typename internal::plain_matrix_type::type PlainObject; - + + /** \brief The interface type of indices + * \details To change this, \c \#define the preprocessor symbol \c EIGEN_DEFAULT_DENSE_INDEX_TYPE. + * \deprecated Since Eigen 3.3, its usage is deprecated. Use Eigen::Index instead. + * \sa StorageIndex, \ref TopicPreprocessorDirectives. + */ + typedef Eigen::Index Index; + + // FIXME is it needed? typedef typename internal::traits::StorageKind StorageKind; - typedef typename internal::traits::StorageIndex StorageIndex; /** \returns a reference to the derived object */ EIGEN_DEVICE_FUNC @@ -46,14 +55,14 @@ template struct EigenBase /** \returns the number of rows. \sa cols(), RowsAtCompileTime */ EIGEN_DEVICE_FUNC - inline StorageIndex rows() const { return derived().rows(); } + inline Index rows() const { return derived().rows(); } /** \returns the number of columns. \sa rows(), ColsAtCompileTime*/ EIGEN_DEVICE_FUNC - inline StorageIndex cols() const { return derived().cols(); } + inline Index cols() const { return derived().cols(); } /** \returns the number of coefficients, which is rows()*cols(). * \sa rows(), cols(), SizeAtCompileTime. */ EIGEN_DEVICE_FUNC - inline StorageIndex size() const { return rows() * cols(); } + inline Index size() const { return rows() * cols(); } /** \internal Don't use it, but do the equivalent: \code dst = *this; \endcode */ template -- cgit v1.2.3