DGtal  0.9.2
NumberTraits.cpp
1 
29 #include "DGtal/kernel/NumberTraits.h"
33 // class Common
35 
39 namespace DGtal
40 {
41  //Constant definitions in NumberTraits specializations.
46 
51 
56 
61 
62  const float NumberTraits<float>::ONE = 1.0f;
63  const float NumberTraits<float>::ZERO = 0.0f;
64 
65  const double NumberTraits<double>::ONE = 1.0;
66  const double NumberTraits<double>::ZERO = 0.0;
67 
68  const long double NumberTraits<long double>::ONE = 1.0;
69  const long double NumberTraits<long double>::ZERO = 0.0;
70 
71 #ifdef WITH_BIGINTEGER
72  const DGtal::BigInteger NumberTraits<DGtal::BigInteger>::ONE = 1;
73  const DGtal::BigInteger NumberTraits<DGtal::BigInteger>::ZERO = 0;
74 #endif
75 
76 }
static const int8_t ZERO
Definition: NumberTraits.h:420
boost::uint32_t uint32_t
unsigned 32-bit integer.
Definition: BasicTypes.h:63
static const int16_t ONE
Definition: NumberTraits.h:269
static const uint64_t ZERO
Definition: NumberTraits.h:641
static const int8_t ONE
Definition: NumberTraits.h:421
boost::int8_t int8_t
signed 8-bit integer.
Definition: BasicTypes.h:68
static const uint8_t ONE
Definition: NumberTraits.h:345
static const long double ONE
Definition: NumberTraits.h:900
static const double ZERO
Definition: NumberTraits.h:843
static const int16_t ZERO
Definition: NumberTraits.h:268
mpz_class BigInteger
Multi-precision integer with GMP implementation.
Definition: BasicTypes.h:79
static const int32_t ONE
Definition: NumberTraits.h:567
boost::int16_t int16_t
signed 16-bit integer.
Definition: BasicTypes.h:70
static const uint64_t ONE
Definition: NumberTraits.h:642
static const uint32_t ZERO
Definition: NumberTraits.h:495
boost::uint16_t uint16_t
unsigned 16-bit integer.
Definition: BasicTypes.h:61
static const int64_t ONE
Definition: NumberTraits.h:717
static const uint8_t ZERO
Definition: NumberTraits.h:344
static const double ONE
Definition: NumberTraits.h:844
static const uint16_t ZERO
Definition: NumberTraits.h:192
DGtal is the top-level namespace which contains all DGtal functions and types.
boost::uint8_t uint8_t
unsigned 8-bit integer.
Definition: BasicTypes.h:59
static const int64_t ZERO
Definition: NumberTraits.h:716
boost::uint64_t uint64_t
unsigned 64-bit integer.
Definition: BasicTypes.h:65
static const uint16_t ONE
Definition: NumberTraits.h:193
boost::int32_t int32_t
signed 32-bit integer.
Definition: BasicTypes.h:72
static const uint32_t ONE
Definition: NumberTraits.h:496
static const float ONE
Definition: NumberTraits.h:788
boost::int64_t int64_t
signed 94-bit integer.
Definition: BasicTypes.h:74
static const float ZERO
Definition: NumberTraits.h:787
static const int32_t ZERO
Definition: NumberTraits.h:566
static const long double ZERO
Definition: NumberTraits.h:899