mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-01-12 14:25:16 +08:00
bug #1635: Use infinity from Numtraits instead of creating it manually.
This commit is contained in:
parent
b57b31cce9
commit
c1d356e8b4
@ -160,7 +160,7 @@ rcond_estimate_helper(typename Decomposition::RealScalar matrix_norm, const Deco
|
|||||||
{
|
{
|
||||||
typedef typename Decomposition::RealScalar RealScalar;
|
typedef typename Decomposition::RealScalar RealScalar;
|
||||||
eigen_assert(dec.rows() == dec.cols());
|
eigen_assert(dec.rows() == dec.cols());
|
||||||
if (dec.rows() == 0) return RealScalar(1)/RealScalar(0);
|
if (dec.rows() == 0) return NumTraits<RealScalar>::infinity();
|
||||||
if (matrix_norm == RealScalar(0)) return RealScalar(0);
|
if (matrix_norm == RealScalar(0)) return RealScalar(0);
|
||||||
if (dec.rows() == 1) return RealScalar(1);
|
if (dec.rows() == 1) return RealScalar(1);
|
||||||
const RealScalar inverse_matrix_norm = rcond_invmatrix_L1_norm_estimate(dec);
|
const RealScalar inverse_matrix_norm = rcond_invmatrix_L1_norm_estimate(dec);
|
||||||
|
Loading…
Reference in New Issue
Block a user