aimstil  5.0.5
til::fuzzy Namespace Reference

Functions

template<typename T >
boost::logic::tribool is_positive (T x, T delta=128 *std::numeric_limits< T >::epsilon())
 Tests whether x is positive, with a +- delta uncertainty cushion. More...
 
template<typename T >
boost::logic::tribool same_sign (T x, T y, T delta=128 *std::numeric_limits< T >::epsilon())
 Returns true iff both arguments have same sign, allowing some degree of imprecision. More...
 

Function Documentation

◆ is_positive()

template<typename T >
boost::logic::tribool til::fuzzy::is_positive ( x,
delta = 128 *std::numeric_limits< T >::epsilon() 
)
inline

Tests whether x is positive, with a +- delta uncertainty cushion.

In other words: if x > delta, x is definitely positive, and the result is true if x < -delta, x is definitely negative, and the result is false otherwise, the result is indeterminate.

◆ same_sign()

template<typename T >
boost::logic::tribool til::fuzzy::same_sign ( x,
y,
delta = 128 *std::numeric_limits< T >::epsilon() 
)
inline