mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-12-21 07:19:46 +08:00
Extend qr unit test
This commit is contained in:
parent
50eef6dfc3
commit
946b99dd5c
@ -41,6 +41,10 @@ template<typename MatrixType> void qr()
|
||||
|
||||
VERIFY_IS_APPROX(m1, c);
|
||||
|
||||
// stress the ReturnByValue mechanism
|
||||
MatrixType tmp;
|
||||
VERIFY_IS_APPROX(tmp.noalias() = qr.matrixQ() * r, (qr.matrixQ() * r).eval());
|
||||
|
||||
MatrixType m2 = MatrixType::Random(cols,cols2);
|
||||
MatrixType m3 = m1*m2;
|
||||
m2 = MatrixType::Random(cols,cols2);
|
||||
|
@ -104,8 +104,8 @@ template<typename ArrayType> void vectorwiseop_array(const ArrayType& m)
|
||||
|
||||
m2 = m1;
|
||||
// yes, there might be an aliasing issue there but ".rowwise() /="
|
||||
// is suppposed to evaluate " m2.colwise().sum()" into to temporary to avoid
|
||||
// evaluating the reducions multiple times
|
||||
// is supposed to evaluate " m2.colwise().sum()" into a temporary to avoid
|
||||
// evaluating the reduction multiple times
|
||||
if(ArrayType::RowsAtCompileTime>2 || ArrayType::RowsAtCompileTime==Dynamic)
|
||||
{
|
||||
m2.rowwise() /= m2.colwise().sum();
|
||||
|
Loading…
Reference in New Issue
Block a user