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/EigenBase.h | |
parent | faa3ff3be6a02b57c6cb05edc87375e54ab96606 (diff) |
the Index types change.
As discussed on the list (too long to explain here).
Diffstat (limited to 'Eigen/src/Core/EigenBase.h')
-rw-r--r-- | Eigen/src/Core/EigenBase.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Eigen/src/Core/EigenBase.h b/Eigen/src/Core/EigenBase.h index e583fddc3..c9d3bd875 100644 --- a/Eigen/src/Core/EigenBase.h +++ b/Eigen/src/Core/EigenBase.h @@ -39,6 +39,9 @@ template<typename Derived> struct EigenBase { // typedef typename ei_plain_matrix_type<Derived>::type PlainObject; + typedef typename ei_traits<Derived>::StorageKind StorageKind; + typedef typename ei_index<StorageKind>::type Index; + /** \returns a reference to the derived object */ Derived& derived() { return *static_cast<Derived*>(this); } /** \returns a const reference to the derived object */ @@ -48,12 +51,12 @@ template<typename Derived> struct EigenBase { return *static_cast<Derived*>(const_cast<EigenBase*>(this)); } /** \returns the number of rows. \sa cols(), RowsAtCompileTime */ - inline int rows() const { return derived().rows(); } + inline Index rows() const { return derived().rows(); } /** \returns the number of columns. \sa rows(), ColsAtCompileTime*/ - inline int 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. */ - inline int 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<typename Dest> inline void evalTo(Dest& dst) const |