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:
@@ -309,9 +309,8 @@ struct ei_compute_inverse_with_check<MatrixType, 1>
|
||||
{
|
||||
static inline bool run(const MatrixType& matrix, MatrixType* result)
|
||||
{
|
||||
if( 0 == result->coeffRef(0,0) ) return false;
|
||||
|
||||
typedef typename MatrixType::Scalar Scalar;
|
||||
if( matrix.coeff(0,0) == Scalar(0) ) return false;
|
||||
result->coeffRef(0,0) = Scalar(1) / matrix.coeff(0,0);
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user