List of all members | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes
utl::CloseAbs Class Reference

#include <Test.h>

Inheritance diagram for utl::CloseAbs:
Inheritance graph
[legend]

Public Member Functions

 CloseAbs (const double eps=1e-6)
 
boost::format Name () const
 
template<typename T >
bool operator() (const T &lhs, const T &rhs) const
 

Protected Member Functions

template<typename T >
bool IsCloseAbs (const T &lhs, const T &rhs) const
 
bool IsCloseAbs (const utl::Triple &lhs, const utl::Triple &rhs) const
 
template<typename T >
bool IsCloseRel (const T &lhs, const T &rhs) const
 
else return IsCloseRel (lhs, rhs)
 

Static Protected Member Functions

template<typename Head , typename Tail >
static double TupleDist2 (const boost::tuples::cons< Head, Tail > &lhs, const boost::tuples::cons< Head, Tail > &rhs)
 
static double TupleDist2 (const boost::tuples::null_type &, const boost::tuples::null_type &)
 

Protected Attributes

bool const
 
double fEpsilon
 

Detailed Description

Definition at line 153 of file Test.h.

Constructor & Destructor Documentation

utl::CloseAbs::CloseAbs ( const double  eps = 1e-6)
inline

Definition at line 155 of file Test.h.

Member Function Documentation

template<typename T >
bool utl::CloseTo::IsCloseAbs ( const T &  lhs,
const T &  rhs 
) const
inlineprotectedinherited

Definition at line 104 of file Test.h.

References utl::abs(), and utl::CloseTo::fEpsilon.

Referenced by operator()().

bool utl::CloseTo::IsCloseAbs ( const utl::Triple lhs,
const utl::Triple rhs 
) const
inlineprotectedinherited

Definition at line 107 of file Test.h.

References utl::CloseTo::fEpsilon, sqrt(), and utl::CloseTo::TupleDist2().

template<typename T >
bool utl::CloseTo::IsCloseRel ( const T &  lhs,
const T &  rhs 
) const
inlineprotectedinherited

Definition at line 111 of file Test.h.

References utl::abs(), and utl::CloseTo::fEpsilon.

Referenced by utl::CloseRel::operator()().

else return utl::CloseTo::IsCloseRel ( lhs  ,
rhs   
)
protectedinherited
boost::format utl::CloseAbs::Name ( ) const
inline

Definition at line 161 of file Test.h.

References utl::CloseTo::fEpsilon.

template<typename T >
bool utl::CloseAbs::operator() ( const T &  lhs,
const T &  rhs 
) const
inline

Definition at line 158 of file Test.h.

References utl::CloseTo::IsCloseAbs().

template<typename Head , typename Tail >
static double utl::CloseTo::TupleDist2 ( const boost::tuples::cons< Head, Tail > &  lhs,
const boost::tuples::cons< Head, Tail > &  rhs 
)
inlinestaticprotectedinherited

Definition at line 138 of file Test.h.

Referenced by utl::CloseTo::IsCloseAbs().

static double utl::CloseTo::TupleDist2 ( const boost::tuples::null_type &  ,
const boost::tuples::null_type &   
)
inlinestaticprotectedinherited

Definition at line 145 of file Test.h.

Member Data Documentation

bool utl::CloseTo::const
protectedinherited
Initial value:
{
return (2*sqrt(TupleDist2(lhs, rhs)) /
(sqrt(TupleDist2(lhs, utl::Triple(0,0,0))) +
sqrt(TupleDist2(rhs, utl::Triple(0,0,0))))) < fEpsilon

Definition at line 117 of file Test.h.

double utl::CloseTo::fEpsilon
protectedinherited

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

, generated on Tue Sep 26 2023.