diff options
author | Benoit Jacob <jacob.benoit.1@gmail.com> | 2007-09-26 14:06:14 +0000 |
---|---|---|
committer | Benoit Jacob <jacob.benoit.1@gmail.com> | 2007-09-26 14:06:14 +0000 |
commit | 55227b1f636b03c321940035061360484ea05e66 (patch) | |
tree | 61674ea1b85a4c21d7eaf087e7b7548ed10f6afc /test | |
parent | 1af61c6ff078e6f9f9cd1298374811cfc73d4488 (diff) |
Deep refactoring.
1) Kill MatrixXpr class, instead let all class inherit a common EigenBase class
2) Kill MatrixBase/Matrix/Vector classes, instead introduce a single Matrix class,
a MatrixStorage class, and typedefs to emulate vectors
3) Huge code cleanup, remove large preprocessor macros, sloccount drop to ~750
down from 1100.
4) Introduce compile-time-known sizes
Diffstat (limited to 'test')
-rw-r--r-- | test/matrixmanip.cpp | 8 | ||||
-rw-r--r-- | test/matrixops.cpp | 14 | ||||
-rw-r--r-- | test/vectorops.cpp | 17 |
3 files changed, 18 insertions, 21 deletions
diff --git a/test/matrixmanip.cpp b/test/matrixmanip.cpp index 90ddcaca9..b5bdd21c6 100644 --- a/test/matrixmanip.cpp +++ b/test/matrixmanip.cpp @@ -38,7 +38,7 @@ template<typename MatrixType> void matrixManip(const MatrixType& m) a.row(i) = b.row(i); a.row(i) += b.row(i); a.minor(i, j) = b.block(1, rows-1, 1, cols-1); - a.alias().minor(i, j) -= a.block(1, rows-1, 1, cols-1); + //a.alias().minor(i, j) -= a.block(1, rows-1, 1, cols-1); } void EigenTest::testMatrixManip() @@ -46,7 +46,7 @@ void EigenTest::testMatrixManip() matrixManip(Matrix<int, 2, 3>()); matrixManip(Matrix<double, 3, 3>()); matrixManip(Matrix<complex<float>, 4,3>()); - matrixManip(MatrixX<int>(2, 2)); - matrixManip(MatrixX<double>(3, 5)); - matrixManip(MatrixX<complex<float> >(4, 4)); + matrixManip(MatrixXi(2, 2)); + matrixManip(MatrixXd(3, 5)); + matrixManip(MatrixXcf(4, 4)); } diff --git a/test/matrixops.cpp b/test/matrixops.cpp index b8fd122c3..1a70dcf5d 100644 --- a/test/matrixops.cpp +++ b/test/matrixops.cpp @@ -47,7 +47,7 @@ template<typename MatrixType1, a.alias() = a + b; a += b; - a.alias().xpr() += b; + a.alias() += b; a -= b + b; MatrixType1 d(rows1, cols1); @@ -61,10 +61,10 @@ void EigenTest::testMatrixOps() matrixOps(Matrix<int, 2, 3>(), Matrix<int, 3, 1>()); matrixOps(Matrix<double, 3, 3>(), Matrix<double, 3, 3>()); matrixOps(Matrix<complex<float>, 4,3>(), Matrix<complex<float>, 3,4>()); - matrixOps(MatrixX<float>(1, 1), MatrixX<float>(1, 3)); - matrixOps(MatrixX<int>(2, 2), MatrixX<int>(2, 2)); - matrixOps(MatrixX<double>(3, 5), MatrixX<double>(5, 1)); - matrixOps(MatrixX<complex<float> >(4, 4), MatrixX<complex<float> >(4, 4)); - matrixOps(MatrixX<double>(3, 5), Matrix<double, 5, 1>()); - matrixOps(Matrix<complex<float>, 4, 4>(), MatrixX<complex<float> >(4, 4)); + /*matrixOps(MatrixXf(1, 1), MatrixXf(1, 3)); + matrixOps(MatrixXi(2, 2), MatrixXi(2, 2)); + matrixOps(MatrixXd(3, 5), MatrixXd(5, 1)); + matrixOps(MatrixXcf(4, 4), MatrixXcf(4, 4)); + matrixOps(MatrixXd(3, 5), Matrix<double, 5, 1>()); + matrixOps(Matrix4cf(), MatrixXcf(4, 4));*/ } diff --git a/test/vectorops.cpp b/test/vectorops.cpp index 33aa72178..5f6331bf1 100644 --- a/test/vectorops.cpp +++ b/test/vectorops.cpp @@ -46,19 +46,16 @@ template<typename VectorType> void vectorOps(const VectorType& v) a += b; a += b + b; - a.xpr() -= b; - a.xpr() -= b + b; a.alias() += a + a; } void EigenTest::testVectorOps() { - vectorOps(Vector<float, 1>()); - vectorOps(Vector<int, 2>()); - vectorOps(Vector<double, 3>()); - vectorOps(Vector<complex<float>, 4>()); - vectorOps(VectorX<float>(1)); - vectorOps(VectorX<int>(2)); - vectorOps(VectorX<double>(3)); - vectorOps(VectorX<complex<float> >(4)); + vectorOps(Vector2i()); + vectorOps(Vector3d()); + vectorOps(Vector4cf()); + /*vectorOps(VectorXf(1)); + vectorOps(VectorXi(2)); + vectorOps(VectorXd(3)); + vectorOps(VectorXcf(4));*/ } |