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)
63 return x.cwiseAbs2().sum() <= numext::abs2(prec * y);
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>
100 const RealScalar& prec
119 template<
typename Derived>
122 const RealScalar& prec
138 template<
typename Derived>
139 template<
typename OtherDerived>
142 const RealScalar& prec
150 #endif // EIGEN_FUZZY_H iterative scaling algorithm to equilibrate rows and column norms in matrices
Definition: TestIMU_Common.h:87
Holds information about the various numeric (i.e.
Definition: NumTraits.h:88
Base class for all dense matrices, vectors, and arrays.
Definition: DenseBase.h:41
Definition: BandTriangularSolver.h:13
Definition: XprHelper.h:316
bool isApprox(const DenseBase< OtherDerived > &other, const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
Definition: Fuzzy.h:98