mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-05-02 00:34:14 +08:00
fix #116 and remove debug cout's
This commit is contained in:
parent
38facbd55b
commit
cf4f90ccea
@ -126,8 +126,8 @@ DenseBase<Derived>::format(const IOFormat& fmt) const
|
|||||||
return WithFormat<Derived>(derived(), fmt);
|
return WithFormat<Derived>(derived(), fmt);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename Scalar>
|
template<typename Scalar, bool IsInteger>
|
||||||
struct ei_significant_decimals_impl
|
struct ei_significant_decimals_default_impl
|
||||||
{
|
{
|
||||||
typedef typename NumTraits<Scalar>::Real RealScalar;
|
typedef typename NumTraits<Scalar>::Real RealScalar;
|
||||||
static inline int run()
|
static inline int run()
|
||||||
@ -136,6 +136,20 @@ struct ei_significant_decimals_impl
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template<typename Scalar>
|
||||||
|
struct ei_significant_decimals_default_impl<Scalar, true>
|
||||||
|
{
|
||||||
|
static inline int run()
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
template<typename Scalar>
|
||||||
|
struct ei_significant_decimals_impl
|
||||||
|
: ei_significant_decimals_default_impl<Scalar, NumTraits<Scalar>::IsInteger>
|
||||||
|
{};
|
||||||
|
|
||||||
/** \internal
|
/** \internal
|
||||||
* print the matrix \a _m to the output stream \a s using the output format \a fmt */
|
* print the matrix \a _m to the output stream \a s using the output format \a fmt */
|
||||||
template<typename Derived>
|
template<typename Derived>
|
||||||
|
@ -780,7 +780,6 @@ struct ei_scalar_fuzzy_default_impl<Scalar, false, false>
|
|||||||
}
|
}
|
||||||
static inline bool isApprox(const Scalar& x, const Scalar& y, const RealScalar& prec)
|
static inline bool isApprox(const Scalar& x, const Scalar& y, const RealScalar& prec)
|
||||||
{
|
{
|
||||||
std::cout << " float" << std::endl;
|
|
||||||
return ei_abs(x - y) <= std::min(ei_abs(x), ei_abs(y)) * prec;
|
return ei_abs(x - y) <= std::min(ei_abs(x), ei_abs(y)) * prec;
|
||||||
}
|
}
|
||||||
static inline bool isApproxOrLessThan(const Scalar& x, const Scalar& y, const RealScalar& prec)
|
static inline bool isApproxOrLessThan(const Scalar& x, const Scalar& y, const RealScalar& prec)
|
||||||
@ -800,7 +799,6 @@ struct ei_scalar_fuzzy_default_impl<Scalar, false, true>
|
|||||||
}
|
}
|
||||||
static inline bool isApprox(const Scalar& x, const Scalar& y, const RealScalar&)
|
static inline bool isApprox(const Scalar& x, const Scalar& y, const RealScalar&)
|
||||||
{
|
{
|
||||||
std::cout << " integer" << std::endl;
|
|
||||||
return x == y;
|
return x == y;
|
||||||
}
|
}
|
||||||
static inline bool isApproxOrLessThan(const Scalar& x, const Scalar& y, const RealScalar&)
|
static inline bool isApproxOrLessThan(const Scalar& x, const Scalar& y, const RealScalar&)
|
||||||
@ -820,7 +818,6 @@ struct ei_scalar_fuzzy_default_impl<Scalar, true, false>
|
|||||||
}
|
}
|
||||||
static inline bool isApprox(const Scalar& x, const Scalar& y, const RealScalar& prec)
|
static inline bool isApprox(const Scalar& x, const Scalar& y, const RealScalar& prec)
|
||||||
{
|
{
|
||||||
std::cout << " cplx" << std::endl;
|
|
||||||
return ei_abs2(x - y) <= std::min(ei_abs2(x), ei_abs2(y)) * prec * prec;
|
return ei_abs2(x - y) <= std::min(ei_abs2(x), ei_abs2(y)) * prec * prec;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user