Gaudi::Math::Lomont< float > Class Template Reference

the specialization for float numbers More...

#include </scratch/z5/marcocle/GaudiDocs/lhcb-release/825/GAUDI/GAUDI_v26r3/InstallArea/x86_64-slc6-gcc48-opt/include/GaudiKernel/Lomont.h>

Inheritance diagram for Gaudi::Math::Lomont< float >:
Collaboration diagram for Gaudi::Math::Lomont< float >:

Public Member Functions

 Lomont (const unsigned short ulps)
 constructor from ULPS: More...
 
bool operator() (const float a, const float b) const
 the only one important method: More...
 
 Lomont (const unsigned short ulps)
 constructor from ULPS: More...
 
bool operator() (const float a, const float b) const
 the only one important method: More...
 

Private Member Functions

 Lomont ()
 the default constructor is disabled More...
 
 Lomont ()
 the default constructor is disabled More...
 

Private Attributes

unsigned short m_ulps
 the precision in "units in last place" More...
 

Detailed Description

template<>
class Gaudi::Math::Lomont< float >

the specialization for float numbers

Gaudi::Math::Lomont<float> compare ( 100 ) ;
const float a = ... ;
const float b = ... ;
const bool equal = compare ( a , b ) ;
See also
class Gaudi::Math::Lomont
Attention
The default precision is not specified!
See also
Gaudi::Math::lomont_compare_float
Author
Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@n.nosp@m.ikhe.nosp@m.f.nl
Date
2009-10-22

Definition at line 156 of file Lomont.h.

Constructor & Destructor Documentation

Gaudi::Math::Lomont< float >::Lomont ( const unsigned short  ulps)
inline

constructor from ULPS:

Definition at line 162 of file Lomont.h.

162 : m_ulps ( ulps ) {}
unsigned short m_ulps
the precision in "units in last place"
Definition: Lomont.h:178
Gaudi::Math::Lomont< float >::Lomont ( )
private

the default constructor is disabled

Gaudi::Math::Lomont< float >::Lomont ( const unsigned short  ulps)
inline

constructor from ULPS:

Definition at line 162 of file Lomont.h.

162 : m_ulps ( ulps ) {}
unsigned short m_ulps
the precision in "units in last place"
Definition: Lomont.h:178
Gaudi::Math::Lomont< float >::Lomont ( )
private

the default constructor is disabled

Member Function Documentation

bool Gaudi::Math::Lomont< float >::operator() ( const float  a,
const float  b 
) const
inline

the only one important method:

Definition at line 167 of file Lomont.h.

168  { return lomont_compare_float ( a , b , m_ulps ) ; }
unsigned short m_ulps
the precision in "units in last place"
Definition: Lomont.h:178
GAUDI_API bool lomont_compare_float(const float af, const float bf, const unsigned short maxULPs)
equality comparison of float numbers using as the metric the maximal number of Units in the Last Plac...
Definition: Lomont.cpp:195
bool Gaudi::Math::Lomont< float >::operator() ( const float  a,
const float  b 
) const
inline

the only one important method:

Definition at line 167 of file Lomont.h.

168  { return lomont_compare_float ( a , b , m_ulps ) ; }
unsigned short m_ulps
the precision in "units in last place"
Definition: Lomont.h:178
GAUDI_API bool lomont_compare_float(const float af, const float bf, const unsigned short maxULPs)
equality comparison of float numbers using as the metric the maximal number of Units in the Last Plac...
Definition: Lomont.cpp:195

Member Data Documentation

unsigned short Gaudi::Math::Lomont< float >::m_ulps
private

the precision in "units in last place"

Definition at line 178 of file Lomont.h.


The documentation for this class was generated from the following file: