aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/sparse_permutations.cpp
diff options
context:
space:
mode:
authorGravatar Christoph Hertzberg <chtz@informatik.uni-bremen.de>2014-12-04 22:48:53 +0100
committerGravatar Christoph Hertzberg <chtz@informatik.uni-bremen.de>2014-12-04 22:48:53 +0100
commite8cdbedefb1913b5a0e2f2b7d38470f081cb8d29 (patch)
treeb64cb33df57f4cfcd87bf42643279629dc0900d3 /test/sparse_permutations.cpp
parent6ccf97f3e6ce39c210e225ba7aae66da15b71660 (diff)
bug #877, bug #572: Introduce a global Index typedef. Rename Sparse*::Index to StorageIndex, make Dense*::StorageIndex an alias to DenseIndex. Overall this commit gets rid of all Index conversion warnings.
Diffstat (limited to 'test/sparse_permutations.cpp')
-rw-r--r--test/sparse_permutations.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/test/sparse_permutations.cpp b/test/sparse_permutations.cpp
index e4ce1d679..dec586776 100644
--- a/test/sparse_permutations.cpp
+++ b/test/sparse_permutations.cpp
@@ -11,15 +11,13 @@
template<int OtherStorage, typename SparseMatrixType> void sparse_permutations(const SparseMatrixType& ref)
{
- typedef typename SparseMatrixType::Index Index;
-
const Index rows = ref.rows();
const Index cols = ref.cols();
typedef typename SparseMatrixType::Scalar Scalar;
- typedef typename SparseMatrixType::Index Index;
- typedef SparseMatrix<Scalar, OtherStorage, Index> OtherSparseMatrixType;
+ typedef typename SparseMatrixType::StorageIndex StorageIndex;
+ typedef SparseMatrix<Scalar, OtherStorage, StorageIndex> OtherSparseMatrixType;
typedef Matrix<Scalar,Dynamic,Dynamic> DenseMatrix;
- typedef Matrix<Index,Dynamic,1> VectorI;
+ typedef Matrix<StorageIndex,Dynamic,1> VectorI;
double density = (std::max)(8./(rows*cols), 0.01);