* take advantage of new possibilies in LLT (mat -= product)

* fix Block::operator+= product which was not optimized
* fix some compilation issues
This commit is contained in:
Gael Guennebaud
2009-07-07 15:32:21 +02:00
parent 92a35c93b2
commit 79877a9917
5 changed files with 23 additions and 23 deletions

View File

@@ -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;