DGtal  0.9.3beta
Public Types | Static Public Member Functions | Static Public Attributes
DGtal::NumberTraits< float > Struct Template Reference

#include <DGtal/kernel/NumberTraits.h>

Public Types

typedef TagFalse IsIntegral
 
typedef TagTrue IsBounded
 
typedef TagFalse IsUnsigned
 
typedef TagTrue IsSigned
 
typedef TagTrue IsSpecialized
 
typedef float SignedVersion
 
typedef float UnsignedVersion
 
typedef float ReturnType
 
typedef boost::call_traits< float >::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 float &aT)
 
static double castToDouble (const float &aT)
 

Static Public Attributes

static const float ZERO = 0.0f
 
static const float ONE = 1.0f
 

Detailed Description

template<>
struct DGtal::NumberTraits< float >

Specialization for float.

Definition at line 776 of file NumberTraits.h.

Member Typedef Documentation

Definition at line 779 of file NumberTraits.h.

Definition at line 778 of file NumberTraits.h.

Definition at line 781 of file NumberTraits.h.

Definition at line 782 of file NumberTraits.h.

Definition at line 780 of file NumberTraits.h.

typedef boost::call_traits<float>::param_type DGtal::NumberTraits< float >::ParamType

Definition at line 786 of file NumberTraits.h.

typedef float DGtal::NumberTraits< float >::ReturnType

Definition at line 785 of file NumberTraits.h.

typedef float DGtal::NumberTraits< float >::SignedVersion

Definition at line 783 of file NumberTraits.h.

typedef float DGtal::NumberTraits< float >::UnsignedVersion

Definition at line 784 of file NumberTraits.h.

Member Function Documentation

static double DGtal::NumberTraits< float >::castToDouble ( const float &  aT)
inlinestatic

Definition at line 821 of file NumberTraits.h.

822  {
823  return static_cast<double>(aT);
824  }
static DGtal::int64_t DGtal::NumberTraits< float >::castToInt64_t ( const float &  aT)
inlinestatic

Definition at line 817 of file NumberTraits.h.

818  {
819  return static_cast<int64_t>( aT );
820  }
boost::int64_t int64_t
signed 94-bit integer.
Definition: BasicTypes.h:74
static unsigned int DGtal::NumberTraits< float >::digits ( )
inlinestatic

Definition at line 805 of file NumberTraits.h.

806  {
807  return FLT_DIG;
808  }
static BoundEnum DGtal::NumberTraits< float >::isBounded ( )
inlinestatic

Definition at line 809 of file NumberTraits.h.

References DGtal::BOUNDED.

810  {
811  return BOUNDED;
812  }
static SignEnum DGtal::NumberTraits< float >::isSigned ( )
inlinestatic

Definition at line 813 of file NumberTraits.h.

References DGtal::SIGNED.

814  {
815  return SIGNED;
816  }
static ReturnType DGtal::NumberTraits< float >::max ( )
inlinestatic

Definition at line 801 of file NumberTraits.h.

802  {
803  return FLT_MAX;
804  }
static ReturnType DGtal::NumberTraits< float >::min ( )
inlinestatic

Definition at line 797 of file NumberTraits.h.

798  {
799  return FLT_MIN;
800  }
static ReturnType DGtal::NumberTraits< float >::one ( )
inlinestatic

Definition at line 793 of file NumberTraits.h.

794  {
795  return 1.0f;
796  }
static ReturnType DGtal::NumberTraits< float >::zero ( )
inlinestatic

Definition at line 789 of file NumberTraits.h.

790  {
791  return 0.0f;
792  }

Field Documentation

const float DGtal::NumberTraits< float >::ONE = 1.0f
static

Definition at line 788 of file NumberTraits.h.

const float DGtal::NumberTraits< float >::ZERO = 0.0f
static

Definition at line 787 of file NumberTraits.h.


The documentation for this struct was generated from the following files: