diff options
author | Benoit Jacob <jacob.benoit.1@gmail.com> | 2008-09-01 17:31:21 +0000 |
---|---|---|
committer | Benoit Jacob <jacob.benoit.1@gmail.com> | 2008-09-01 17:31:21 +0000 |
commit | 46fe7a3d9ec14ea56a879c48ba7f15e78342c8cb (patch) | |
tree | c708710574525c93c9732d23e7e935863434b9ac /test/adjoint.cpp | |
parent | 49ff9b204c8ddd448fe214fdaf8622c4fe97c795 (diff) |
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.
Diffstat (limited to 'test/adjoint.cpp')
-rw-r--r-- | test/adjoint.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/test/adjoint.cpp b/test/adjoint.cpp index 982584eea..9a50e076e 100644 --- a/test/adjoint.cpp +++ b/test/adjoint.cpp @@ -41,19 +41,19 @@ template<typename MatrixType> void adjoint(const MatrixType& m) if (ei_is_same_type<RealScalar,float>::ret) largerEps = 1e-3f; - MatrixType m1 = test_random_matrix<MatrixType>(rows, cols), - m2 = test_random_matrix<MatrixType>(rows, cols), + MatrixType m1 = MatrixType::Random(rows, cols), + m2 = MatrixType::Random(rows, cols), m3(rows, cols), mzero = MatrixType::Zero(rows, cols), identity = SquareMatrixType::Identity(rows, rows), - square = test_random_matrix<SquareMatrixType>(rows, rows); - VectorType v1 = test_random_matrix<VectorType>(rows), - v2 = test_random_matrix<VectorType>(rows), - v3 = test_random_matrix<VectorType>(rows), + square = SquareMatrixType::Random(rows, rows); + VectorType v1 = VectorType::Random(rows), + v2 = VectorType::Random(rows), + v3 = VectorType::Random(rows), vzero = VectorType::Zero(rows); - Scalar s1 = test_random<Scalar>(), - s2 = test_random<Scalar>(); + Scalar s1 = ei_random<Scalar>(), + s2 = ei_random<Scalar>(); // check basic compatibility of adjoint, transpose, conjugate VERIFY_IS_APPROX(m1.transpose().conjugate().adjoint(), m1); |