7#ifndef SPECTRA_TYPE_TRAITS_H
8#define SPECTRA_TYPE_TRAITS_H
36template <
typename Scalar>
39 static constexpr Scalar epsilon()
41 return Eigen::numext::numeric_limits<Scalar>::epsilon();
43 static constexpr Scalar (min)()
45 return epsilon() * epsilon() * epsilon();
51struct TypeTraits<float>
53 static constexpr float epsilon()
55 return std::numeric_limits<float>::epsilon();
57 static constexpr float (min)()
59 return (std::numeric_limits<float>::min)();
64struct TypeTraits<double>
66 static constexpr double epsilon()
68 return std::numeric_limits<double>::epsilon();
70 static constexpr double (min)()
72 return (std::numeric_limits<double>::min)();
77struct TypeTraits<long double>
79 static constexpr long double epsilon()
81 return std::numeric_limits<long double>::epsilon();
83 static constexpr long double (min)()
85 return (std::numeric_limits<long double>::min)();
93using ElemType =
typename Eigen::NumTraits<T>::Real;