diff options
author | Gael Guennebaud <g.gael@free.fr> | 2009-07-07 15:32:21 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2009-07-07 15:32:21 +0200 |
commit | 79877a9917c6482930ef2ac15e2de7ef8a7a757e (patch) | |
tree | ac56b397bdc58b7fc107f4d044f9a90d1d52603c /test | |
parent | 92a35c93b2b53694f77993142ce8fcad70bc5519 (diff) |
* take advantage of new possibilies in LLT (mat -= product)
* fix Block::operator+= product which was not optimized
* fix some compilation issues
Diffstat (limited to 'test')
-rw-r--r-- | test/cholesky.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/cholesky.cpp b/test/cholesky.cpp index 8bb9286e5..253f67282 100644 --- a/test/cholesky.cpp +++ b/test/cholesky.cpp @@ -91,6 +91,14 @@ template<typename MatrixType> void cholesky(const MatrixType& m) VERIFY_IS_APPROX(symm * vecX, vecB); chol.solve(matB, &matX); VERIFY_IS_APPROX(symm * matX, matB); + + // test the upper mode + LLT<SquareMatrixType,UpperTriangular> cholup(symm); + VERIFY_IS_APPROX(symm, cholup.matrixL().toDense() * chol.matrixL().adjoint().toDense()); + cholup.solve(vecB, &vecX); + VERIFY_IS_APPROX(symm * vecX, vecB); + cholup.solve(matB, &matX); + VERIFY_IS_APPROX(symm * matX, matB); } int sign = ei_random<int>()%2 ? 1 : -1; |