DGtal
0.6.devel
|
#include <NumberTraits.h>
Public Types | |
typedef TagUnknown | IsBounded |
typedef TagUnknown | IsUnsigned |
typedef TagUnknown | IsSigned |
typedef TagFalse | IsSpecialized |
typedef T | SignedVersion |
typedef T | UnsignedVersion |
typedef T | ReturnType |
typedef boost::call_traits< T > ::param_type | ParamType |
Static Public Member Functions | |
static ReturnType | zero () |
static ReturnType | one () |
static ReturnType | min () |
static ReturnType | max () |
static unsigned int | digits () |
static BoundEnum | isBounded () |
static SignEnum | isSigned () |
static DGtal::int64_t | castToInt64_t (const T &aT) |
static double | castToDouble (const T &aT) |
static bool | even (ParamType aT) |
static bool | odd (ParamType aT) |
Static Public Attributes | |
static const T | ZERO = T(0) |
static const T | ONE = T(1) |
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.
Definition at line 71 of file NumberTraits.h.
typedef TagUnknown DGtal::NumberTraits< T >::IsBounded |
Definition at line 74 of file NumberTraits.h.
typedef TagUnknown DGtal::NumberTraits< T >::IsSigned |
Definition at line 76 of file NumberTraits.h.
typedef TagFalse DGtal::NumberTraits< T >::IsSpecialized |
Definition at line 77 of file NumberTraits.h.
typedef TagUnknown DGtal::NumberTraits< T >::IsUnsigned |
Definition at line 75 of file NumberTraits.h.
typedef boost::call_traits<T>::param_type DGtal::NumberTraits< T >::ParamType |
Definition at line 84 of file NumberTraits.h.
typedef T DGtal::NumberTraits< T >::ReturnType |
Definition at line 80 of file NumberTraits.h.
typedef T DGtal::NumberTraits< T >::SignedVersion |
Definition at line 78 of file NumberTraits.h.
typedef T DGtal::NumberTraits< T >::UnsignedVersion |
Definition at line 79 of file NumberTraits.h.
|
inlinestatic |
Cast method to double (for I/O or board export uses only).
Definition at line 155 of file NumberTraits.h.
Referenced by DGtal::Display2DFactory::draw(), DGtal::Display3DFactory::draw(), DGtal::Display2DFactory::drawAsDigitalPoints(), DGtal::Display3DFactory::drawAsPoints(), DGtal::ImageLinearCellEmbedder< TKSpace, TImage, TEmbedder >::embedSCell(), DGtal::COBANaivePlane< TSpace, TInternalInteger >::getBounds(), DGtal::CircleFrom3Points< TPoint >::getCurvature(), DGtal::COBANaivePlane< TSpace, TInternalInteger >::getNormal(), DGtal::CircleFrom3Points< TPoint >::getParameters(), DGtal::Preimage2D< Shape >::getSeparatingStraightLine(), DGtal::PointVector< dim, TEuclideanRing >::norm(), and DGtal::ImageLinearCellEmbedder< TKSpace, TImage, TEmbedder >::operator()().
|
inlinestatic |
Cast method to DGtal::int64_t (for I/O or board export uses only).
Definition at line 147 of file NumberTraits.h.
Referenced by DGtal::Display3DFactory::draw(), DGtal::Pattern< TFraction >::getGreatestIncludedSubpattern(), and DGtal::Pattern< TFraction >::getSmallestCoveringSubpattern().
|
inlinestatic |
Definition at line 104 of file NumberTraits.ih.
|
inlinestatic |
aT | any number. |
Definition at line 163 of file NumberTraits.h.
|
inlinestatic |
Definition at line 115 of file NumberTraits.ih.
References DGtal::BOUND_UNKNOWN.
|
inlinestatic |
Definition at line 126 of file NumberTraits.ih.
References DGtal::SIGN_UNKNOWN.
|
inlinestatic |
Definition at line 92 of file NumberTraits.ih.
Referenced by DGtal::KhalimskySpaceND< dim, TInteger >::KhalimskySpaceND().
|
inlinestatic |
Definition at line 80 of file NumberTraits.ih.
Referenced by DGtal::KhalimskySpaceND< dim, TInteger >::KhalimskySpaceND().
|
inlinestatic |
aT | any number. |
Definition at line 171 of file NumberTraits.h.
|
inlinestatic |
Definition at line 64 of file NumberTraits.ih.
|
inlinestatic |
Definition at line 49 of file NumberTraits.ih.
|
static |
Constant One.
Definition at line 103 of file NumberTraits.h.
Referenced by DGtal::NumberTraits< Integer >::even(), and DGtal::NumberTraits< Integer >::odd().
|
static |
Constant Zero.
Definition at line 94 of file NumberTraits.h.
Referenced by DGtal::NumberTraits< Integer >::even(), and DGtal::NumberTraits< Integer >::odd().