mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Fix missing evaluator in outer-product
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user