aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported
diff options
context:
space:
mode:
authorGravatar Hauke Heibel <hauke.heibel@gmail.com>2010-06-20 17:37:56 +0200
committerGravatar Hauke Heibel <hauke.heibel@gmail.com>2010-06-20 17:37:56 +0200
commitf1679c7185471289afaf702a45e336849d20a81a (patch)
tree2d6d649c8d0ae0985dfeaae2fdf2da47294264ae /unsupported
parente402d34407226d9c2c5dfc14ef5d6dbf53ee3c8e (diff)
Utilize Index in all unit tests.
Diffstat (limited to 'unsupported')
-rw-r--r--unsupported/Eigen/AlignedVector312
-rw-r--r--unsupported/Eigen/src/SparseExtra/UmfPackSupport.h5
-rw-r--r--unsupported/test/sparse_extra.cpp5
3 files changed, 12 insertions, 10 deletions
diff --git a/unsupported/Eigen/AlignedVector3 b/unsupported/Eigen/AlignedVector3
index 6e9772cf5..7efe4ac21 100644
--- a/unsupported/Eigen/AlignedVector3
+++ b/unsupported/Eigen/AlignedVector3
@@ -68,19 +68,19 @@ template<typename _Scalar> class AlignedVector3
EIGEN_DENSE_PUBLIC_INTERFACE(AlignedVector3)
using Base::operator*;
- inline int rows() const { return 3; }
- inline int cols() const { return 1; }
+ inline Index rows() const { return 3; }
+ inline Index cols() const { return 1; }
- inline const Scalar& coeff(int row, int col) const
+ inline const Scalar& coeff(Index row, Index col) const
{ return m_coeffs.coeff(row, col); }
- inline Scalar& coeffRef(int row, int col)
+ inline Scalar& coeffRef(Index row, Index col)
{ return m_coeffs.coeffRef(row, col); }
- inline const Scalar& coeff(int index) const
+ inline const Scalar& coeff(Index index) const
{ return m_coeffs.coeff(index); }
- inline Scalar& coeffRef(int index)
+ inline Scalar& coeffRef(Index index)
{ return m_coeffs.coeffRef(index);}
diff --git a/unsupported/Eigen/src/SparseExtra/UmfPackSupport.h b/unsupported/Eigen/src/SparseExtra/UmfPackSupport.h
index 950624758..9c0dfcc08 100644
--- a/unsupported/Eigen/src/SparseExtra/UmfPackSupport.h
+++ b/unsupported/Eigen/src/SparseExtra/UmfPackSupport.h
@@ -200,8 +200,9 @@ class SparseLU<MatrixType,UmfPack> : public SparseLU<MatrixType>
template<typename MatrixType>
void SparseLU<MatrixType,UmfPack>::compute(const MatrixType& a)
{
- const int rows = a.rows();
- const int cols = a.cols();
+ typedef typename MatrixType::Index Index;
+ const Index rows = a.rows();
+ const Index cols = a.cols();
ei_assert((MatrixType::Flags&RowMajorBit)==0 && "Row major matrices are not supported yet");
m_matrixRef = &a;
diff --git a/unsupported/test/sparse_extra.cpp b/unsupported/test/sparse_extra.cpp
index fa6dc50f5..6cf1f50c4 100644
--- a/unsupported/test/sparse_extra.cpp
+++ b/unsupported/test/sparse_extra.cpp
@@ -61,8 +61,9 @@ bool test_random_setter(DynamicSparseMatrix<T>& sm, const DenseType& ref, const
template<typename SparseMatrixType> void sparse_extra(const SparseMatrixType& ref)
{
- const int rows = ref.rows();
- const int cols = ref.cols();
+ typedef typename SparseMatrixType::Index Index;
+ const Index rows = ref.rows();
+ const Index cols = ref.cols();
typedef typename SparseMatrixType::Scalar Scalar;
enum { Flags = SparseMatrixType::Flags };