mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-06-04 18:54:00 +08:00
Add regression test for bug #608
This commit is contained in:
parent
a69b4b092b
commit
4811b4526c
@ -268,10 +268,18 @@ template<typename MatrixType> void cholesky_indefinite(const MatrixType& m)
|
|||||||
{
|
{
|
||||||
eigen_assert(m.rows() == 2 && m.cols() == 2);
|
eigen_assert(m.rows() == 2 && m.cols() == 2);
|
||||||
MatrixType mat;
|
MatrixType mat;
|
||||||
mat << 1, 0, 0, -1;
|
{
|
||||||
LDLT<MatrixType> ldlt(mat);
|
mat << 1, 0, 0, -1;
|
||||||
VERIFY(!ldlt.isNegative());
|
LDLT<MatrixType> ldlt(mat);
|
||||||
VERIFY(!ldlt.isPositive());
|
VERIFY(!ldlt.isNegative());
|
||||||
|
VERIFY(!ldlt.isPositive());
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mat << 1, 2, 2, 1;
|
||||||
|
LDLT<MatrixType> ldlt(mat);
|
||||||
|
VERIFY(!ldlt.isNegative());
|
||||||
|
VERIFY(!ldlt.isPositive());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename MatrixType> void cholesky_verify_assert()
|
template<typename MatrixType> void cholesky_verify_assert()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user