19template<typename Derived, typename OtherDerived, bool is_integer = NumTraits<typename Derived::Scalar>::IsInteger>
23 static bool run(
const Derived& x,
const OtherDerived&
y,
const typename Derived::RealScalar& prec)
27 return (nested - otherNested).cwiseAbs2().sum() <= prec * prec *
numext::mini(nested.cwiseAbs2().sum(), otherNested.cwiseAbs2().sum());
31template<
typename Derived,
typename OtherDerived>
35 static bool run(
const Derived& x,
const OtherDerived&
y,
const typename Derived::RealScalar&)
37 return x.matrix() ==
y.matrix();
41template<typename Derived, typename OtherDerived, bool is_integer = NumTraits<typename Derived::Scalar>::IsInteger>
45 static bool run(
const Derived& x,
const OtherDerived&
y,
const typename Derived::RealScalar& prec)
47 return x.cwiseAbs2().sum() <=
numext::abs2(prec) *
y.cwiseAbs2().sum();
51template<
typename Derived,
typename OtherDerived>
55 static bool run(
const Derived& x,
const OtherDerived&,
const typename Derived::RealScalar&)
57 return x.matrix() == Derived::Zero(x.rows(), x.cols()).matrix();
61template<typename Derived, bool is_integer = NumTraits<typename Derived::Scalar>::IsInteger>
65 static bool run(
const Derived& x,
const typename Derived::RealScalar&
y,
const typename Derived::RealScalar& prec)
71template<
typename Derived>
75 static bool run(
const Derived& x,
const typename Derived::RealScalar&,
const typename Derived::RealScalar&)
77 return x.matrix() == Derived::Zero(x.rows(), x.cols()).matrix();
101template<
typename Derived>
102template<
typename OtherDerived>
124template<
typename Derived>
143template<
typename Derived>
144template<
typename OtherDerived>
#define EIGEN_DEVICE_FUNC
Definition: Macros.h:986
Base class for all dense matrices, vectors, and arrays.
Definition: DenseBase.h:47
NumTraits< Scalar >::Real RealScalar
Definition: DenseBase.h:73
EIGEN_DEVICE_FUNC bool isMuchSmallerThan(const RealScalar &other, const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
EIGEN_DEVICE_FUNC bool isApprox(const DenseBase< OtherDerived > &other, const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
Definition: Fuzzy.h:103
const Scalar & y
Definition: MathFunctions.h:821
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE T mini(const T &x, const T &y)
Definition: MathFunctions.h:1083
EIGEN_DEVICE_FUNC bool abs2(bool x)
Definition: MathFunctions.h:1292
Namespace containing all symbols from the Eigen library.
Definition: MatrixExponential.h:16
Definition: Eigen_Colamd.h:50
Holds information about the various numeric (i.e.
Definition: NumTraits.h:233
static EIGEN_DEVICE_FUNC bool run(const Derived &x, const OtherDerived &y, const typename Derived::RealScalar &)
Definition: Fuzzy.h:35
static EIGEN_DEVICE_FUNC bool run(const Derived &x, const OtherDerived &y, const typename Derived::RealScalar &prec)
Definition: Fuzzy.h:23
static EIGEN_DEVICE_FUNC bool run(const Derived &x, const OtherDerived &, const typename Derived::RealScalar &)
Definition: Fuzzy.h:55
static EIGEN_DEVICE_FUNC bool run(const Derived &x, const OtherDerived &y, const typename Derived::RealScalar &prec)
Definition: Fuzzy.h:45
static EIGEN_DEVICE_FUNC bool run(const Derived &x, const typename Derived::RealScalar &, const typename Derived::RealScalar &)
Definition: Fuzzy.h:75
static EIGEN_DEVICE_FUNC bool run(const Derived &x, const typename Derived::RealScalar &y, const typename Derived::RealScalar &prec)
Definition: Fuzzy.h:65