Dune Core Modules (2.9.1)

float_cmp.hh File Reference

Various ways to compare floating-point numbers. More...

#include "float_cmp.cc"

Go to the source code of this file.

Classes

struct  Dune::FloatCmp::DefaultEpsilon< T, style >
 mapping from a value type and a compare style to a default epsilon More...
 
class  Dune::FloatCmpOps< T, cstyle_, rstyle_ >
 Class encapsulating a default epsilon. More...
 

Namespaces

namespace  Dune
 Dune namespace.
 
namespace  Dune::FloatCmp
 

Enumerations

enum  Dune::FloatCmp::CmpStyle { Dune::FloatCmp::relativeWeak , Dune::FloatCmp::relativeStrong , Dune::FloatCmp::absolute , Dune::FloatCmp::defaultCmpStyle = relativeWeak }
 
enum  Dune::FloatCmp::RoundingStyle {
  Dune::FloatCmp::towardZero , Dune::FloatCmp::towardInf , Dune::FloatCmp::downward , Dune::FloatCmp::upward ,
  Dune::FloatCmp::defaultRoundingStyle = towardZero
}
 

Functions

template<class T , CmpStyle style>
bool Dune::FloatCmp::eq (const T &first, const T &second, typename EpsilonType< T >::Type epsilon=DefaultEpsilon< T, style >::value())
 test for equality using epsilon More...
 
template<class T , CmpStyle style>
bool Dune::FloatCmp::ne (const T &first, const T &second, typename EpsilonType< T >::Type epsilon=DefaultEpsilon< T, style >::value())
 test for inequality using epsilon More...
 
template<class T , CmpStyle style>
bool Dune::FloatCmp::gt (const T &first, const T &second, typename EpsilonType< T >::Type epsilon=DefaultEpsilon< T, style >::value())
 test if first greater than second More...
 
template<class T , CmpStyle style>
bool Dune::FloatCmp::lt (const T &first, const T &second, typename EpsilonType< T >::Type epsilon=DefaultEpsilon< T, style >::value())
 test if first lesser than second More...
 
template<class T , CmpStyle style>
bool Dune::FloatCmp::ge (const T &first, const T &second, typename EpsilonType< T >::Type epsilon=DefaultEpsilon< T, style >::value())
 test if first greater or equal second More...
 
template<class T , CmpStyle style>
bool Dune::FloatCmp::le (const T &first, const T &second, typename EpsilonType< T >::Type epsilon=DefaultEpsilon< T, style >::value())
 test if first lesser or equal second More...
 
template<class I , class T , CmpStyle cstyle, RoundingStyle rstyle>
Dune::FloatCmp::round (const T &val, typename EpsilonType< T >::Type epsilon=DefaultEpsilon< T, cstyle >::value())
 round using epsilon More...
 
template<class I , class T , CmpStyle cstyle, RoundingStyle rstyle>
Dune::FloatCmp::trunc (const T &val, typename EpsilonType< T >::Type epsilon=DefaultEpsilon< T, cstyle >::value())
 truncate using epsilon More...
 

Detailed Description

Various ways to compare floating-point numbers.

Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 21, 23:30, 2024)