aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/inverse.cpp
diff options
context:
space:
mode:
authorGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2008-09-01 17:31:21 +0000
committerGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2008-09-01 17:31:21 +0000
commit46fe7a3d9ec14ea56a879c48ba7f15e78342c8cb (patch)
treec708710574525c93c9732d23e7e935863434b9ac /test/inverse.cpp
parent49ff9b204c8ddd448fe214fdaf8622c4fe97c795 (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/inverse.cpp')
-rw-r--r--test/inverse.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/inverse.cpp b/test/inverse.cpp
index eaa7bfd3f..42121072c 100644
--- a/test/inverse.cpp
+++ b/test/inverse.cpp
@@ -38,7 +38,7 @@ template<typename MatrixType> void inverse(const MatrixType& m)
typedef typename NumTraits<Scalar>::Real RealScalar;
typedef Matrix<Scalar, MatrixType::ColsAtCompileTime, 1> VectorType;
- MatrixType m1 = test_random_matrix<MatrixType>(rows, cols),
+ MatrixType m1 = MatrixType::Random(rows, cols),
m2(rows, cols),
mzero = MatrixType::Zero(rows, cols),
identity = MatrixType::Identity(rows, rows);
@@ -46,7 +46,7 @@ template<typename MatrixType> void inverse(const MatrixType& m)
if (ei_is_same_type<RealScalar,float>::ret)
{
// let's build a more stable to inverse matrix
- MatrixType a = test_random_matrix<MatrixType>(rows,cols);
+ MatrixType a = MatrixType::Random(rows,cols);
m1 += m1 * m1.adjoint() + a * a.adjoint();
}