5 EIGEN_STRONG_INLINE const Scalar operator() (const Scalar& a, const Scalar& b)
const {
7 if (isfinite(a) && isfinite(b))
return a + b;
8 if (isfinite(a))
return a;
9 if (isfinite(b))
return b;
13 template<
typename Scalar>
16 Cost = 2 * NumTraits<Scalar>::ReadCost + NumTraits<Scalar>::AddCost,
21 template<
typename Scalar>
24 EIGEN_STRONG_INLINE const Scalar operator() (const Scalar& a, const Scalar& b)
const {
27 if (isfinite(a) && isfinite(b))
return (min)(a, b);
28 if (isfinite(a))
return a;
29 if (isfinite(b))
return b;
33 template<
typename Scalar>
36 Cost = NumTraits<Scalar>::AddCost,
41 template<
typename Scalar>
44 EIGEN_STRONG_INLINE const Scalar operator() (const Scalar& a, const Scalar& b)
const {
47 if (isfinite(a) && isfinite(b))
return (max)(a, b);
48 if (isfinite(a))
return a;
49 if (isfinite(b))
return b;
53 template<
typename Scalar>
56 Cost = NumTraits<Scalar>::AddCost,