mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Merge WrapArray into FromArray. Less code. The downside is that we're using one more
const_cast. But I think that anyway trying to maintain const strictness in Eigen2 is not worth the hassle. Konstantin: so the code snippet I sent you won't work anymore, replace wrapArray with fromArray. CCMAIL:konst.heil@stud.uni-heidelberg.de
This commit is contained in:
@@ -87,6 +87,13 @@ template<typename MatrixType> void basicStuff(const MatrixType& m)
|
||||
QVERIFY(v1.isApprox(identity * v1));
|
||||
|
||||
QVERIFY((square * (m1 + m2)).isApprox(square * m1 + square * m2));
|
||||
|
||||
Scalar* array1 = new Scalar[rows];
|
||||
Scalar* array2 = new Scalar[rows];
|
||||
Matrix<Scalar, Dynamic, 1>::fromArray(array1, rows) = Matrix<Scalar, Dynamic, 1>::random(rows);
|
||||
Matrix<Scalar, Dynamic, 1>::fromArray(array2, rows) = Matrix<Scalar, Dynamic, 1>::fromArray(array1, rows);
|
||||
bool b = Matrix<Scalar, Dynamic, 1>::fromArray(array1, rows).isApprox(Matrix<Scalar, Dynamic, 1>::fromArray(array2, rows));
|
||||
QVERIFY(b);
|
||||
}
|
||||
|
||||
void EigenTest::testBasicStuff()
|
||||
|
||||
Reference in New Issue
Block a user