mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
bug fix in inverse for 1x1 matrix,
some compilation fixes in sparse_solvers
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user