mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
* make PartialLU avoid to generate inf/nan when given a singular matrix
(result undefined, but at least it won't take forever on intel 387) * add lots of comments, especially to LU.h * fix stuff I had broken in Inverse.h * split inverse test
This commit is contained in:
@@ -200,7 +200,7 @@ struct ei_compute_inverse
|
||||
{
|
||||
static inline void run(const MatrixType& matrix, ResultType* result)
|
||||
{
|
||||
result = matrix.partialLu().inverse();
|
||||
*result = matrix.partialLu().inverse();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -282,7 +282,9 @@ inline void MatrixBase<Derived>::computeInverse(ResultType *result) const
|
||||
template<typename Derived>
|
||||
inline const typename MatrixBase<Derived>::PlainMatrixType MatrixBase<Derived>::inverse() const
|
||||
{
|
||||
return inverse(*this);
|
||||
typename MatrixBase<Derived>::PlainMatrixType result;
|
||||
computeInverse(&result);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user