patch from Moritz Lenz to allow solving transposed problem with superlu

This commit is contained in:
Gael Guennebaud
2009-04-10 19:54:43 +00:00
parent fb3078fb62
commit 804a239d30
3 changed files with 39 additions and 5 deletions

View File

@@ -191,6 +191,14 @@ template<typename Scalar> void sparse_solvers(int rows, int cols)
VERIFY(refX.isApprox(x,test_precision<Scalar>()) && "LU: SuperLU");
}
// std::cerr << refDet << " == " << slu.determinant() << "\n";
if (slu.solve(b, &x, SvTranspose)) {
VERIFY(b.isApprox(m2.transpose() * x, test_precision<Scalar>()));
}
if (slu.solve(b, &x, SvAdjoint)) {
// VERIFY(b.isApprox(m2.adjoint() * x, test_precision<Scalar>()));
}
if (count==0) {
VERIFY_IS_APPROX(refDet,slu.determinant()); // FIXME det is not very stable for complex
}