DUNE PDELab (2.8)
float_cmp.hh
Go to the documentation of this file.
111 };
125 };
251 template<class I, class T, CmpStyle cstyle /*= defaultCmpStyle*/, RoundingStyle rstyle /*= defaultRoundingStyle*/>
252 I round(const T &val, typename EpsilonType<T>::Type epsilon = DefaultEpsilon<T, cstyle>::value());
268 template<class I, class T, CmpStyle cstyle /*= defaultCmpStyle*/, RoundingStyle rstyle /*= defaultRoundingStyle*/>
269 I trunc(const T &val, typename EpsilonType<T>::Type epsilon = DefaultEpsilon<T, cstyle>::value());
bool le(const ValueType &first, const ValueType &second) const
test if first lesser or equal second
Definition: float_cmp.cc:484
FloatCmpOps(EpsilonType epsilon=DefaultEpsilon::value())
construct an operations object
Definition: float_cmp.cc:429
bool eq(const ValueType &first, const ValueType &second) const
test for equality using epsilon
Definition: float_cmp.cc:449
static const CmpStyle cstyle
How comparisons are done.
Definition: float_cmp.hh:293
bool lt(const ValueType &first, const ValueType &second) const
test if first lesser than second
Definition: float_cmp.cc:470
bool ge(const ValueType &first, const ValueType &second) const
test if first greater or equal second
Definition: float_cmp.cc:477
static const RoundingStyle rstyle
How rounding is done.
Definition: float_cmp.hh:295
FloatCmp::EpsilonType< T >::Type EpsilonType
Type of the epsilon.
Definition: float_cmp.hh:302
bool ne(const ValueType &first, const ValueType &second) const
test for inequality using epsilon
Definition: float_cmp.cc:456
EpsilonType epsilon() const
return the current epsilon
Definition: float_cmp.cc:434
I round(const ValueType &val) const
round using epsilon
Definition: float_cmp.cc:493
I trunc(const ValueType &val) const
truncate using epsilon
Definition: float_cmp.cc:501
bool gt(const ValueType &first, const ValueType &second) const
test if first greater than second
Definition: float_cmp.cc:463
bool ne(const T &first, const T &second, typename EpsilonType< T >::Type epsilon)
test for inequality using epsilon
Definition: float_cmp.cc:149
bool eq(const T &first, const T &second, typename EpsilonType< T >::Type epsilon)
test for equality using epsilon
Definition: float_cmp.cc:142
I round(const T &val, typename EpsilonType< T >::Type epsilon)
round using epsilon
Definition: float_cmp.cc:309
I trunc(const T &val, typename EpsilonType< T >::Type epsilon)
truncate using epsilon
Definition: float_cmp.cc:405
bool lt(const T &first, const T &second, typename EpsilonType< T >::Type epsilon)
test if first lesser than second
Definition: float_cmp.cc:163
bool gt(const T &first, const T &second, typename EpsilonType< T >::Type epsilon)
test if first greater than second
Definition: float_cmp.cc:156
bool ge(const T &first, const T &second, typename EpsilonType< T >::Type epsilon)
test if first greater or equal second
Definition: float_cmp.cc:170
bool le(const T &first, const T &second, typename EpsilonType< T >::Type epsilon)
test if first lesser or equal second
Definition: float_cmp.cc:177
@ defaultCmpStyle
the global default compare style (relative_weak)
Definition: float_cmp.hh:110
@ relativeStrong
|a-b|/|a| <= epsilon && |a-b|/|b| <= epsilon
Definition: float_cmp.hh:106
@ relativeWeak
|a-b|/|a| <= epsilon || |a-b|/|b| <= epsilon
Definition: float_cmp.hh:104
@ defaultRoundingStyle
the global default rounding style (toward_zero)
Definition: float_cmp.hh:124
mapping from a value type and a compare style to a default epsilon
Definition: float_cmp.hh:136
static EpsilonType< T >::Type value()
Returns the default epsilon for the given value type and compare style.
T Type
The epsilon type corresponding to value type T.
Definition: float_cmp.cc:23
|
Legal Statements / Impressum |
Hosted by TU Dresden |
generated with Hugo v0.111.3
(Dec 21, 23:30, 2024)