From 46fe7a3d9ec14ea56a879c48ba7f15e78342c8cb Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Mon, 1 Sep 2008 17:31:21 +0000 Subject: 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. --- test/linearstructure.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/linearstructure.cpp') diff --git a/test/linearstructure.cpp b/test/linearstructure.cpp index 5178839c9..39b4690a0 100644 --- a/test/linearstructure.cpp +++ b/test/linearstructure.cpp @@ -38,13 +38,13 @@ template void linearStructure(const MatrixType& m) // this test relies a lot on Random.h, and there's not much more that we can do // to test it, hence I consider that we will have tested Random.h - MatrixType m1 = test_random_matrix(rows, cols), - m2 = test_random_matrix(rows, cols), + MatrixType m1 = MatrixType::Random(rows, cols), + m2 = MatrixType::Random(rows, cols), m3(rows, cols), mzero = MatrixType::Zero(rows, cols); - Scalar s1 = test_random(); - while (ei_abs(s1)<1e-3) s1 = test_random(); + Scalar s1 = ei_random(); + while (ei_abs(s1)<1e-3) s1 = ei_random(); int r = ei_random(0, rows-1), c = ei_random(0, cols-1); -- cgit v1.2.3