Stable Numerics Subroutine Library
Programming Reference Manual
Version 1.2 DD-00006-012

5.2.5 Comparison operators

bool operator==(const interval<T>& o) const; 
bool operator!=(const interval<T>& o) const; 
bool operator==(const std::pair<T,T>& o) const; 
bool operator!=(const std::pair<T,T>& o) const;

These two operators check the equality or inequality of the infinimum and supremum element-wise. Let T,O ∈IR with T being the current instance, this and O being the given other interval to compare to, that is o:

operator==(const interval<T>&) and operator==(const std::pair<T,T>&)


Set equality operation, as defined as (t= o)∧(t=o). With either an other interval or a std::pair whose first element is interpreted as o and second element o .

operator!=(const interval<T>&) and operator!=(const std::pair<T,T>&)


Set inequality operation, as defined as (t̸= o)∨(t̸=o). With either an other interval or a std::pair whose first element is interpreted as o and second element o .