bug fix in inverse for 1x1 matrix,

some compilation fixes in sparse_solvers
This commit is contained in:
Gael Guennebaud
2009-07-27 18:09:56 +02:00
parent 94cc30180e
commit 5f3606bce9
4 changed files with 14 additions and 17 deletions

View File

@@ -333,12 +333,12 @@ bool SparseLDLT<MatrixType, Backend>::solveInPlace(MatrixBase<Derived> &b) const
return false;
if (m_matrix.nonZeros()>0) // otherwise L==I
m_matrix.template triangular<LowerTriangular|UnitDiagBit>().solveInPlace(b);
m_matrix.template triangular<UnitLowerTriangular>().solveInPlace(b);
b = b.cwise() / m_diag;
// FIXME should be .adjoint() but it fails to compile...
if (m_matrix.nonZeros()>0) // otherwise L==I
m_matrix.transpose().template triangular<UpperTriangular|UnitDiagBit>().solveInPlace(b);
m_matrix.transpose().template triangular<UnitUpperTriangular>().solveInPlace(b);
return true;
}