mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
* move dummy_precision and epsilon to NumTraits
* make NumTraits inherits std::numeric_limits
This commit is contained in:
@@ -295,7 +295,7 @@ JacobiSVD<MatrixType, Options>& JacobiSVD<MatrixType, Options>::compute(const Ma
|
||||
int cols = matrix.cols();
|
||||
int diagSize = std::min(rows, cols);
|
||||
m_singularValues.resize(diagSize);
|
||||
const RealScalar precision = 2 * epsilon<Scalar>();
|
||||
const RealScalar precision = 2 * NumTraits<Scalar>::epsilon();
|
||||
|
||||
if(!ei_svd_precondition_if_more_rows_than_cols<MatrixType, Options>::run(matrix, work_matrix, *this)
|
||||
&& !ei_svd_precondition_if_more_cols_than_rows<MatrixType, Options>::run(matrix, work_matrix, *this))
|
||||
|
||||
@@ -193,7 +193,7 @@ SVD<MatrixType>& SVD<MatrixType>::compute(const MatrixType& matrix)
|
||||
int i=0,its=0,j=0,k=0,l=0,nm=0;
|
||||
Scalar anorm, c, f, g, h, s, scale, x, y, z;
|
||||
bool convergence = true;
|
||||
Scalar eps = dummy_precision<Scalar>();
|
||||
Scalar eps = NumTraits<Scalar>::dummy_precision();
|
||||
|
||||
Matrix<Scalar,Dynamic,1> rv1(n);
|
||||
g = scale = anorm = 0;
|
||||
|
||||
Reference in New Issue
Block a user