Holds information about the various numeric (i.e. scalar) types allowed by Eigen. More...
#include <NumTraits.h>

Additional Inherited Members | |
Public Types inherited from Eigen::GenericNumTraits< T > | |
| enum | { IsInteger = std::numeric_limits<T>::is_integer, IsSigned = std::numeric_limits<T>::is_signed, IsComplex = 0, RequireInitialization = internal::is_arithmetic<T>::value ? 0 : 1, ReadCost = 1, AddCost = 1, MulCost = 1 } |
| typedef T | Real |
Holds information about the various numeric (i.e. scalar) types allowed by Eigen.
| T | the numeric type at hand |
This class stores enums, typedefs and static methods giving information about a numeric type.
The provided data consists of:
Real, giving the "real part" type of T. If T is already real, then Real is just a typedef to T. If T is std::complex<U> then Real is a typedef to U. NonInteger, giving the type that should be used for operations producing non-integral values, such as quotients, square roots, etc. If T is a floating-point type, then this typedef just gives T again. Note however that many Eigen functions such as internal::sqrt simply refuse to take integers. Outside of a few cases, Eigen doesn't do automatic type promotion. Thus, this typedef is only intended as a helper for code that needs to explicitly promote types. Literal giving the type to use for numeric literals such as "2" or "0.5". For instance, for std::complex<U>, Literal is defined as U. Of course, this type must be fully compatible with T. In doubt, just use T here. std::complex type, and to 0 otherwise. 1 if T is an integer type such as int, and to 0 otherwise. 1 if T is a signed type and to 0 if T is unsigned. 1 if the constructor of the numeric type T must be called, and to 0 if it is safe not to call it. Default is 0 if T is an arithmetic type, and 1 otherwise. Definition at line 150 of file NumTraits.h.