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:
Benoit Jacob
2007-10-14 18:02:16 +00:00
parent a94a8c68e8
commit f355ef2df0
7 changed files with 17 additions and 85 deletions

View File

@@ -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()