19 template<typename Derived, typename OtherDerived, bool is_integer = NumTraits<typename Derived::Scalar>::IsInteger>
22 static bool run(
const Derived& x,
const OtherDerived&
y,
const typename Derived::RealScalar& prec)
27 return (nested - otherNested).cwiseAbs2().sum() <= prec * prec * (min)(nested.cwiseAbs2().sum(), otherNested.cwiseAbs2().sum());
31 template<
typename Derived,
typename OtherDerived>
34 static bool run(
const Derived& x,
const OtherDerived&
y,
const typename Derived::RealScalar&)
36 return x.matrix() == y.matrix();
40 template<typename Derived, typename OtherDerived, bool is_integer = NumTraits<typename Derived::Scalar>::IsInteger>
43 static bool run(
const Derived& x,
const OtherDerived&
y,
const typename Derived::RealScalar& prec)
45 return x.cwiseAbs2().sum() <=
numext::abs2(prec) * y.cwiseAbs2().sum();
49 template<
typename Derived,
typename OtherDerived>
52 static bool run(
const Derived& x,
const OtherDerived&,
const typename Derived::RealScalar&)
54 return x.matrix() == Derived::Zero(x.rows(), x.cols()).matrix();
58 template<typename Derived, bool is_integer = NumTraits<typename Derived::Scalar>::IsInteger>
61 static bool run(
const Derived& x,
const typename Derived::RealScalar&
y,
const typename Derived::RealScalar& prec)
67 template<
typename Derived>
70 static bool run(
const Derived& x,
const typename Derived::RealScalar&,
const typename Derived::RealScalar&)
72 return x.matrix() == Derived::Zero(x.rows(), x.cols()).matrix();
96 template<
typename Derived>
97 template<
typename OtherDerived>
119 template<
typename Derived>
138 template<
typename Derived>
139 template<
typename OtherDerived>
150 #endif // EIGEN_FUZZY_H static bool run(const Derived &x, const OtherDerived &y, const typename Derived::RealScalar &prec)
bool isApprox(const DenseBase< OtherDerived > &other, const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
static bool run(const Derived &x, const typename Derived::RealScalar &y, const typename Derived::RealScalar &prec)
iterative scaling algorithm to equilibrate rows and column norms in matrices
Holds information about the various numeric (i.e. scalar) types allowed by Eigen. ...
static bool run(const Derived &x, const OtherDerived &, const typename Derived::RealScalar &)
Base class for all dense matrices, vectors, and arrays.
EIGEN_STRONG_INLINE const CwiseUnaryOp< internal::scalar_abs2_op< Scalar >, const Derived > abs2() const
NumTraits< Scalar >::Real RealScalar
static bool run(const Derived &x, const OtherDerived &y, const typename Derived::RealScalar &)
bool isMuchSmallerThan(const RealScalar &other, const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
static bool run(const Derived &x, const OtherDerived &y, const typename Derived::RealScalar &prec)
static bool run(const Derived &x, const typename Derived::RealScalar &, const typename Derived::RealScalar &)