mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Fix bugs reported by Timothy Hunter:
* CholeskyWithoutSqrt with 1x1 matrices * .part<Diagonal>() Updated unit tests to handle these cases
This commit is contained in:
@@ -81,6 +81,8 @@ template<typename MatrixType> void triangular(const MatrixType& m)
|
||||
m1.template part<Eigen::Lower>() = (m2.transpose() * m2).lazy();
|
||||
VERIFY_IS_APPROX(m3.template part<Eigen::Lower>(), m1);
|
||||
|
||||
VERIFY_IS_APPROX(m3.template part<Diagonal>(), m3.diagonal().asDiagonal());
|
||||
|
||||
m1 = MatrixType::Random(rows, cols);
|
||||
for (int i=0; i<rows; ++i)
|
||||
while (ei_abs2(m1(i,i))<1e-3) m1(i,i) = ei_random<Scalar>();
|
||||
|
||||
Reference in New Issue
Block a user