diff options
author | Gael Guennebaud <g.gael@free.fr> | 2010-06-03 08:41:11 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2010-06-03 08:41:11 +0200 |
commit | 8350ab9fb85d278cf2687efc86d211b25741c657 (patch) | |
tree | 495359fc672163d7bdd0e294cb0d12a0e2b2d233 /Eigen/src/Core/DiagonalMatrix.h | |
parent | 38d8352b7bc6c839297aee11a91e64aff4d51aff (diff) |
* remove ei_index, and let ei_traits propagate the index types
* add an Index type template parapeter to sparse objects
Diffstat (limited to 'Eigen/src/Core/DiagonalMatrix.h')
-rw-r--r-- | Eigen/src/Core/DiagonalMatrix.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Eigen/src/Core/DiagonalMatrix.h b/Eigen/src/Core/DiagonalMatrix.h index 8d3b458a9..34eeda089 100644 --- a/Eigen/src/Core/DiagonalMatrix.h +++ b/Eigen/src/Core/DiagonalMatrix.h @@ -34,7 +34,7 @@ class DiagonalBase : public EigenBase<Derived> typedef typename ei_traits<Derived>::DiagonalVectorType DiagonalVectorType; typedef typename DiagonalVectorType::Scalar Scalar; typedef typename ei_traits<Derived>::StorageKind StorageKind; - typedef typename ei_index<StorageKind>::type Index; + typedef typename ei_traits<Derived>::Index Index; enum { RowsAtCompileTime = DiagonalVectorType::SizeAtCompileTime, @@ -103,6 +103,7 @@ struct ei_traits<DiagonalMatrix<_Scalar,SizeAtCompileTime,MaxSizeAtCompileTime> { typedef Matrix<_Scalar,SizeAtCompileTime,1,0,MaxSizeAtCompileTime,1> DiagonalVectorType; typedef Dense StorageKind; + typedef DenseIndex Index; }; template<typename _Scalar, int SizeAtCompileTime, int MaxSizeAtCompileTime> @@ -115,7 +116,7 @@ class DiagonalMatrix typedef const DiagonalMatrix& Nested; typedef _Scalar Scalar; typedef typename ei_traits<DiagonalMatrix>::StorageKind StorageKind; - typedef typename ei_index<StorageKind>::type Index; + typedef typename ei_traits<DiagonalMatrix>::Index Index; #endif protected: @@ -203,6 +204,7 @@ struct ei_traits<DiagonalWrapper<_DiagonalVectorType> > { typedef _DiagonalVectorType DiagonalVectorType; typedef typename DiagonalVectorType::Scalar Scalar; + typedef typename DiagonalVectorType::Index Index; typedef typename DiagonalVectorType::StorageKind StorageKind; enum { RowsAtCompileTime = DiagonalVectorType::SizeAtCompileTime, |