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/cholesky.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/cholesky.cpp')
-rw-r--r-- | test/cholesky.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/cholesky.cpp b/test/cholesky.cpp index ca57f7644..36a11c723 100644 --- a/test/cholesky.cpp +++ b/test/cholesky.cpp @@ -43,12 +43,12 @@ template<typename MatrixType> void cholesky(const MatrixType& m) typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, MatrixType::RowsAtCompileTime> SquareMatrixType; typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, 1> VectorType; - MatrixType a0 = test_random_matrix<MatrixType>(rows,cols); - VectorType vecB = test_random_matrix<VectorType>(rows); - MatrixType matB = test_random_matrix<MatrixType>(rows,cols); + MatrixType a0 = MatrixType::Random(rows,cols); + VectorType vecB = VectorType::Random(rows); + MatrixType matB = MatrixType::Random(rows,cols); SquareMatrixType symm = a0 * a0.adjoint(); // let's make sure the matrix is not singular or near singular - MatrixType a1 = test_random_matrix<MatrixType>(rows,cols); + MatrixType a1 = MatrixType::Random(rows,cols); symm += a1 * a1.adjoint(); #ifdef HAS_GSL |