bug #897: makes iterative sparse solvers use a Ref<SparseMatrix> instead of a SparseMatrix pointer. This fixes usage of iterative solvers with a Map<SparseMatrix>.

This commit is contained in:
Gael Guennebaud
2015-02-09 11:41:25 +01:00
parent bde98df03f
commit 87629cd639
4 changed files with 41 additions and 21 deletions

View File

@@ -32,7 +32,7 @@ void check_sparse_solving(Solver& solver, const typename Solver::MatrixType& A,
x = solver.solve(b);
if (solver.info() != Success)
{
std::cerr << "sparse solver testing: solving failed\n";
std::cerr << "sparse solver testing: solving failed (" << typeid(Solver).name() << ")\n";
return;
}
VERIFY(oldb.isApprox(b) && "sparse solver testing: the rhs should not be modified!");
@@ -75,7 +75,8 @@ void check_sparse_solving(Solver& solver, const typename Solver::MatrixType& A,
xm = solver.solve(bm);
if (solver.info() != Success)
{
std::cerr << "sparse solver testing: solving failed\n";
std::cerr << "sparse solver testing: solving with a Map failed\n";
exit(0);
return;
}
VERIFY(oldb.isApprox(bm) && "sparse solver testing: the rhs should not be modified!");