DGtal
1.5.beta
|
Aim: The traits class for all models of Cinteger. More...
#include <DGtal/kernel/NumberTraits.h>
Additional Inherited Members | |
Public Types inherited from DGtal::NumberTraitsImpl< std::decay< T >::type > | |
typedef TagUnknown | IsBounded |
Is the number bounded. More... | |
typedef TagUnknown | IsUnsigned |
Is the number unsigned. More... | |
typedef TagUnknown | IsSigned |
Is the number signed. More... | |
typedef TagUnknown | IsIntegral |
Is the number of integral type. More... | |
typedef TagFalse | IsSpecialized |
Is that a number type with specific traits. More... | |
typedef std::decay< T >::type | SignedVersion |
Alias to the signed version of the number type. More... | |
typedef std::decay< T >::type | UnsignedVersion |
Alias to the unsigned version of the number type. More... | |
typedef std::decay< T >::type | ReturnType |
Alias to the type that should be used as return type. More... | |
typedef boost::call_traits< std::decay< T >::type >::param_type | ParamType |
Defines a type that represents the "best" way to pass a parameter of type T to a function. More... | |
Static Public Member Functions inherited from DGtal::NumberTraitsImpl< std::decay< T >::type > | |
static ReturnType | zero () |
Return the zero of this integer. More... | |
static ReturnType | one () |
Return the one of this integer. More... | |
static ReturnType | min () |
Return the minimum possible value for this type of integer or ONE if not bounded or unknown. More... | |
static ReturnType | max () |
Return the maximum possible value for this type of integer or ZERO if not bounded or unknown. More... | |
static unsigned int | digits () |
Return the number of significant binary digits for this integer type, or 0 if unbounded or unknown. More... | |
static BoundEnum | isBounded () |
Return the bounding type of the number. More... | |
static SignEnum | isSigned () |
Return the sign type of the number. More... | |
static DGtal::int64_t | castToInt64_t (const std::decay< T >::type &aT) |
Cast method to DGtal::int64_t (for I/O or board export uses only). More... | |
static constexpr DGtal::uint64_t | castToUInt64_t (const std::decay< T >::type &aT) noexcept |
Cast method to DGtal::uint64_t (for I/O or board export uses only). More... | |
static double | castToDouble (const std::decay< T >::type &aT) |
Cast method to double (for I/O or board export uses only). More... | |
static bool | even (ParamType aT) |
Check the parity of a number. More... | |
static bool | odd (ParamType aT) |
Check the parity of a number. More... | |
Static Public Attributes inherited from DGtal::NumberTraitsImpl< std::decay< T >::type > | |
static const std::decay< T >::type | ZERO |
Constant Zero. More... | |
static const std::decay< T >::type | ONE |
Constant One. More... | |
Aim: The traits class for all models of Cinteger.
Description of template class 'NumberTraits'
Since CInteger describes the concept Integer, this class is used by models of CIinteger to specialize some definitions related to Integer. For instance it defines whether a given Integer is signed or not and what is signed/unsigned version.
It inherits from NumberTraitsImpl by passing it the given number type without any CV qualifier.
Definition at line 562 of file NumberTraits.h.