Loading...
Searching...
No Matches
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
| Various ways to compare floating-point numbers.

## 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
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
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
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
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
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
template<class I, class T, CmpStyle cstyle, RoundingStyle rstyle>
I | Dune::FloatCmp::round (const T &val, typename EpsilonType< T >::Type epsilon=DefaultEpsilon< T, cstyle >::value())
| round using epsilon
template<class I, class T, CmpStyle cstyle, RoundingStyle rstyle>
I | Dune::FloatCmp::trunc (const T &val, typename EpsilonType< T >::Type epsilon=DefaultEpsilon< T, cstyle >::value())
| truncate using epsilon

## Detailed Description

Various ways to compare floating-point numbers.