10#ifndef EIGEN_NUMTRAITS_H
11#define EIGEN_NUMTRAITS_H
20 bool use_numeric_limits = std::numeric_limits<T>::is_specialized,
44 static int run() {
return 0; }
51 bool use_numeric_limits = std::numeric_limits<T>::is_specialized,
56 static int run() {
return std::numeric_limits<T>::digits; }
75 static int run() {
return 0; }
84template <
typename Tgt,
typename Src>
86#if EIGEN_HAS_TYPE_TRAITS
89 EIGEN_STATIC_ASSERT(std::is_trivially_copyable<Tgt>::value && std::is_default_constructible<Tgt>::value,
90 THIS_TYPE_IS_NOT_SUPPORTED);
96 memcpy(&tgt, &src,
sizeof(Tgt));
174 static inline Real epsilon()
176 return numext::numeric_limits<T>::epsilon();
186 static inline int digits()
192 static inline int min_exponent()
194 return numext::numeric_limits<T>::min_exponent;
198 static inline int max_exponent()
200 return numext::numeric_limits<T>::max_exponent;
204 static inline Real dummy_precision()
211 static inline T highest() {
216 static inline T lowest() {
218 : static_cast<T>(-(numext::numeric_limits<T>::
max)());
222 static inline T infinity() {
223 return numext::numeric_limits<T>::infinity();
227 static inline T quiet_NaN() {
228 return numext::numeric_limits<T>::quiet_NaN();
276template<
typename Scalar,
int Rows,
int Cols,
int Options,
int MaxRows,
int MaxCols>
320 static inline std::string epsilon();
321 static inline std::string dummy_precision();
322 static inline std::string lowest();
323 static inline std::string highest();
324 static inline std::string infinity();
325 static inline std::string quiet_NaN();
#define EIGEN_USING_STD(FUNC)
Definition: Macros.h:1195
#define EIGEN_CONSTEXPR
Definition: Macros.h:797
#define EIGEN_DEVICE_FUNC
Definition: Macros.h:986
#define EIGEN_STRONG_INLINE
Definition: Macros.h:927
#define EIGEN_STATIC_ASSERT(CONDITION, MSG)
Definition: StaticAssert.h:127
General-purpose arrays with easy API for coefficient-wise operations.
Definition: Array.h:47
type
Definition: core.h:575
dimensionless::scalar_t log(const ScalarUnit x) noexcept
Compute natural logarithm.
Definition: math.h:349
dimensionless::scalar_t log10(const ScalarUnit x) noexcept
Compute common logarithm.
Definition: math.h:365
UnitType ceil(const UnitType x) noexcept
Round up value.
Definition: math.h:528
constexpr common_t< T1, T2 > max(const T1 x, const T2 y) noexcept
Compile-time pairwise maximum function.
Definition: max.hpp:35
constexpr common_t< T1, T2 > min(const T1 x, const T2 y) noexcept
Compile-time pairwise minimum function.
Definition: min.hpp:35
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Tgt bit_cast(const Src &src)
Definition: NumTraits.h:85
Namespace containing all symbols from the Eigen library.
Definition: MatrixExponential.h:16
const int HugeCost
This value means that the cost to evaluate an expression coefficient is either very expensive or cann...
Definition: Constants.h:44
const int Dynamic
This value means that a positive quantity (e.g., a size) is not known at compile-time,...
Definition: Constants.h:22
Definition: format.h:2555
Definition: Eigen_Colamd.h:50
Definition: StdDeque.h:50
static constexpr const charge::coulomb_t e(1.6021766208e-19)
elementary charge.
Definition: NumTraits.h:153
@ RequireInitialization
Definition: NumTraits.h:158
@ IsSigned
Definition: NumTraits.h:156
@ ReadCost
Definition: NumTraits.h:159
@ AddCost
Definition: NumTraits.h:160
@ IsInteger
Definition: NumTraits.h:155
@ IsComplex
Definition: NumTraits.h:157
@ MulCost
Definition: NumTraits.h:161
T Real
Definition: NumTraits.h:164
NumTraits< Scalar >::Real RealScalar
Definition: NumTraits.h:280
EIGEN_DEVICE_FUNC static EIGEN_CONSTEXPR RealScalar epsilon()
Definition: NumTraits.h:298
NumTraits< Scalar >::Literal Literal
Definition: NumTraits.h:285
EIGEN_DEVICE_FUNC static EIGEN_CONSTEXPR RealScalar dummy_precision()
Definition: NumTraits.h:300
ArrayType & Nested
Definition: NumTraits.h:284
NumTraits< Scalar >::NonInteger NonIntegerScalar
Definition: NumTraits.h:282
Array< RealScalar, Rows, Cols, Options, MaxRows, MaxCols > Real
Definition: NumTraits.h:281
Array< Scalar, Rows, Cols, Options, MaxRows, MaxCols > ArrayType
Definition: NumTraits.h:279
static EIGEN_CONSTEXPR int digits10()
Definition: NumTraits.h:303
Array< NonIntegerScalar, Rows, Cols, Options, MaxRows, MaxCols > NonInteger
Definition: NumTraits.h:283
EIGEN_DEVICE_FUNC static EIGEN_CONSTEXPR double dummy_precision()
Definition: NumTraits.h:245
EIGEN_DEVICE_FUNC static EIGEN_CONSTEXPR float dummy_precision()
Definition: NumTraits.h:239
static EIGEN_CONSTEXPR long double dummy_precision()
Definition: NumTraits.h:252
EIGEN_DEVICE_FUNC static EIGEN_CONSTEXPR Real dummy_precision()
Definition: NumTraits.h:271
EIGEN_DEVICE_FUNC static EIGEN_CONSTEXPR int digits10()
Definition: NumTraits.h:273
NumTraits< _Real >::Literal Literal
Definition: NumTraits.h:259
EIGEN_DEVICE_FUNC static EIGEN_CONSTEXPR Real epsilon()
Definition: NumTraits.h:269
_Real Real
Definition: NumTraits.h:258
static EIGEN_CONSTEXPR int digits10()
Definition: NumTraits.h:317
Holds information about the various numeric (i.e.
Definition: NumTraits.h:233
EIGEN_DEVICE_FUNC static EIGEN_CONSTEXPR int run()
Definition: NumTraits.h:32
EIGEN_DEVICE_FUNC static EIGEN_CONSTEXPR int run()
Definition: NumTraits.h:44
Definition: NumTraits.h:23
EIGEN_DEVICE_FUNC static EIGEN_CONSTEXPR int run()
Definition: NumTraits.h:25
EIGEN_DEVICE_FUNC static EIGEN_CONSTEXPR int run()
Definition: NumTraits.h:63
EIGEN_DEVICE_FUNC static EIGEN_CONSTEXPR int run()
Definition: NumTraits.h:75
Definition: NumTraits.h:54
EIGEN_DEVICE_FUNC static EIGEN_CONSTEXPR int run()
Definition: NumTraits.h:56