aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2015-02-13 18:57:41 +0100
committerGravatar Gael Guennebaud <g.gael@free.fr>2015-02-13 18:57:41 +0100
commitfc202bab398ed9b78ef8452f8e4ef35e233965f6 (patch)
treef0f427ee115aa8579b0d43a49c2ad762b1b0f57c /test
parentfe513199808654bfa5080fe16bda7dcdafbd57c6 (diff)
Index refactoring: StorageIndex must be used for storage only (and locally when it make sense). In all other cases use the global Index type.
Diffstat (limited to 'test')
-rw-r--r--test/nullary.cpp3
-rw-r--r--test/sparse_basic.cpp4
-rw-r--r--test/sparse_product.cpp6
3 files changed, 5 insertions, 8 deletions
diff --git a/test/nullary.cpp b/test/nullary.cpp
index 8344855df..2c148e205 100644
--- a/test/nullary.cpp
+++ b/test/nullary.cpp
@@ -12,7 +12,6 @@
template<typename MatrixType>
bool equalsIdentity(const MatrixType& A)
{
- typedef typename MatrixType::Index Index;
typedef typename MatrixType::Scalar Scalar;
Scalar zero = static_cast<Scalar>(0);
@@ -35,7 +34,6 @@ bool equalsIdentity(const MatrixType& A)
template<typename VectorType>
void testVectorType(const VectorType& base)
{
- typedef typename VectorType::Index Index;
typedef typename VectorType::Scalar Scalar;
const Index size = base.size();
@@ -104,7 +102,6 @@ void testVectorType(const VectorType& base)
template<typename MatrixType>
void testMatrixType(const MatrixType& m)
{
- typedef typename MatrixType::Index Index;
const Index rows = m.rows();
const Index cols = m.cols();
diff --git a/test/sparse_basic.cpp b/test/sparse_basic.cpp
index 8fd759c93..b06956974 100644
--- a/test/sparse_basic.cpp
+++ b/test/sparse_basic.cpp
@@ -16,8 +16,8 @@ template<typename SparseMatrixType> void sparse_basic(const SparseMatrixType& re
typedef typename SparseMatrixType::StorageIndex StorageIndex;
typedef Matrix<StorageIndex,2,1> Vector2;
- const StorageIndex rows = ref.rows();
- const StorageIndex cols = ref.cols();
+ const Index rows = ref.rows();
+ const Index cols = ref.cols();
const Index inner = ref.innerSize();
const Index outer = ref.outerSize();
diff --git a/test/sparse_product.cpp b/test/sparse_product.cpp
index b3f653d0e..480a660fc 100644
--- a/test/sparse_product.cpp
+++ b/test/sparse_product.cpp
@@ -11,7 +11,7 @@
template<typename SparseMatrixType> void sparse_product()
{
- typedef typename SparseMatrixType::StorageIndex Index;
+ typedef typename SparseMatrixType::StorageIndex StorageIndex;
Index n = 100;
const Index rows = internal::random<Index>(1,n);
const Index cols = internal::random<Index>(1,n);
@@ -23,8 +23,8 @@ template<typename SparseMatrixType> void sparse_product()
typedef Matrix<Scalar,Dynamic,Dynamic> DenseMatrix;
typedef Matrix<Scalar,Dynamic,1> DenseVector;
typedef Matrix<Scalar,1,Dynamic> RowDenseVector;
- typedef SparseVector<Scalar,0,Index> ColSpVector;
- typedef SparseVector<Scalar,RowMajor,Index> RowSpVector;
+ typedef SparseVector<Scalar,0,StorageIndex> ColSpVector;
+ typedef SparseVector<Scalar,RowMajor,StorageIndex> RowSpVector;
Scalar s1 = internal::random<Scalar>();
Scalar s2 = internal::random<Scalar>();