fix compilation when defaulting to row major

This commit is contained in:
Gael Guennebaud 2011-01-04 14:40:06 +01:00
parent 3a4d56171d
commit d7e1eeaece

View File

@ -102,11 +102,14 @@ template<typename Scalar> void sparse_llt(int rows, int cols)
// with multiple rhs // with multiple rhs
ref_X = refMat3.template selfadjointView<Lower>().llt().solve(B); ref_X = refMat3.template selfadjointView<Lower>().llt().solve(B);
#ifndef EIGEN_DEFAULT_TO_ROW_MAJOR
// TODO make sure the API is properly documented about this fact
X = CholmodDecomposition<SparseMatrix<Scalar>, Lower>(m3).solve(B); X = CholmodDecomposition<SparseMatrix<Scalar>, Lower>(m3).solve(B);
VERIFY(ref_X.isApprox(X,test_precision<Scalar>()) && "LLT: cholmod solve, multiple dense rhs"); VERIFY(ref_X.isApprox(X,test_precision<Scalar>()) && "LLT: cholmod solve, multiple dense rhs");
X = CholmodDecomposition<SparseMatrix<Scalar>, Upper>(m3).solve(B); X = CholmodDecomposition<SparseMatrix<Scalar>, Upper>(m3).solve(B);
VERIFY(ref_X.isApprox(X,test_precision<Scalar>()) && "LLT: cholmod solve, multiple dense rhs"); VERIFY(ref_X.isApprox(X,test_precision<Scalar>()) && "LLT: cholmod solve, multiple dense rhs");
#endif
// with a sparse rhs // with a sparse rhs