Fix missing evaluator in outer-product

This commit is contained in:
Gael Guennebaud
2015-01-13 10:25:50 +01:00
parent ae4644cc68
commit 279786e987
2 changed files with 16 additions and 4 deletions

View File

@@ -9,6 +9,7 @@
#define EIGEN_NO_STATIC_ASSERT
#include "product.h"
#include <Eigen/LU>
// regression test for bug 447
void product1x1()
@@ -46,5 +47,14 @@ void test_product_small()
Vector3f v = Vector3f::Random();
VERIFY_IS_APPROX( (v * v.transpose()) * v, (v * v.transpose()).eval() * v);
}
{
// regression test for pull-request #93
Eigen::Matrix<double, 1, 1> A; A.setRandom();
Eigen::Matrix<double, 18, 1> B; B.setRandom();
Eigen::Matrix<double, 1, 18> C; C.setRandom();
VERIFY_IS_APPROX(B * A.inverse(), B * A.inverse()[0]);
VERIFY_IS_APPROX(A.inverse() * C, A.inverse()[0] * C);
}
#endif
}