if EIGEN_NICE_RANDOM is defined, the random functions will return numbers with

few bits left of the comma and for floating-point types will never return zero.
This replaces the custom functions in test/main.h, so one does not anymore need
to think about that when writing tests.
This commit is contained in:
Benoit Jacob
2008-09-01 17:31:21 +00:00
parent 49ff9b204c
commit 46fe7a3d9e
15 changed files with 78 additions and 83 deletions

View File

@@ -45,12 +45,12 @@ template<typename MatrixType> void eigensolver(const MatrixType& m)
RealScalar largerEps = 10*test_precision<RealScalar>();
MatrixType a = test_random_matrix<MatrixType>(rows,cols);
MatrixType a1 = test_random_matrix<MatrixType>(rows,cols);
MatrixType a = MatrixType::Random(rows,cols);
MatrixType a1 = MatrixType::Random(rows,cols);
MatrixType symmA = a.adjoint() * a + a1.adjoint() * a1;
MatrixType b = test_random_matrix<MatrixType>(rows,cols);
MatrixType b1 = test_random_matrix<MatrixType>(rows,cols);
MatrixType b = MatrixType::Random(rows,cols);
MatrixType b1 = MatrixType::Random(rows,cols);
MatrixType symmB = b.adjoint() * b + b1.adjoint() * b1;
SelfAdjointEigenSolver<MatrixType> eiSymm(symmA);