diff options
author | Gael Guennebaud <g.gael@free.fr> | 2008-08-23 15:14:20 +0000 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2008-08-23 15:14:20 +0000 |
commit | 2120fed849e1d00724694a2c8a041ec5561c750b (patch) | |
tree | 984bb801927df2aa12cf866fc76465466bd40eb6 /test/linearstructure.cpp | |
parent | 312013a08911816e287425d598e55e5d356e0ac5 (diff) |
* bug fixes in: Dot, generalized eigen problem, singular matrix detetection in Cholesky
* fix all numerical instabilies in the unit tests, now all tests can be run 2000 times
with almost zero failures.
Diffstat (limited to 'test/linearstructure.cpp')
-rw-r--r-- | test/linearstructure.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/test/linearstructure.cpp b/test/linearstructure.cpp index 47f1cbed7..5178839c9 100644 --- a/test/linearstructure.cpp +++ b/test/linearstructure.cpp @@ -41,15 +41,10 @@ template<typename MatrixType> void linearStructure(const MatrixType& m) MatrixType m1 = test_random_matrix<MatrixType>(rows, cols), m2 = test_random_matrix<MatrixType>(rows, cols), m3(rows, cols), - mzero = MatrixType::Zero(rows, cols), - identity = Matrix<Scalar, MatrixType::RowsAtCompileTime, MatrixType::RowsAtCompileTime> - ::Identity(rows, rows), - square = test_random_matrix<Matrix<Scalar, MatrixType::RowsAtCompileTime, MatrixType::RowsAtCompileTime> >(rows, rows); - VectorType v1 = test_random_matrix<VectorType>(rows), - v2 = test_random_matrix<VectorType>(rows), - vzero = VectorType::Zero(rows); + mzero = MatrixType::Zero(rows, cols); Scalar s1 = test_random<Scalar>(); + while (ei_abs(s1)<1e-3) s1 = test_random<Scalar>(); int r = ei_random<int>(0, rows-1), c = ei_random<int>(0, cols-1); @@ -94,6 +89,7 @@ void test_linearstructure() for(int i = 0; i < g_repeat; i++) { CALL_SUBTEST( linearStructure(Matrix<float, 1, 1>()) ); CALL_SUBTEST( linearStructure(Matrix2f()) ); + CALL_SUBTEST( linearStructure(Vector3d()) ); CALL_SUBTEST( linearStructure(Matrix4d()) ); CALL_SUBTEST( linearStructure(MatrixXcf(3, 3)) ); CALL_SUBTEST( linearStructure(MatrixXf(8, 12)) ); |