mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user