9 _Interval__compare(const Interval_t<T>&a,Interval_t<T> const&b)
11 if (a.left == b.left && a.right == b.right)
14 if (a.left <= b.left && a.right >= b.right)
17 if (a.left >= b.left && a.right <= b.right)
26 Interval__compare(const Interval_t<T>&a,Interval_t<T> const&b)
28 int i = _Interval__compare(a,b);
35 const Real INFTY = 1e8; // ARGh. AIX sucks
37 const Real INFTY = HUGE_VAL;
42 Interval_t<T>::set_empty()
50 Interval_t<T>::length() const {
51 assert(right >= left);
57 Interval_t<T>::unite(Interval_t<T> h)
66 smallest Interval which includes *this and #h#
71 Interval_t<T>::intersect(Interval_t<T> h)
73 #if defined (__GNUG__) && ! defined (__STRICT_ANSI__)
74 left = h.left >? left;
75 right = h.right <?right;
77 left = max(h.left, left);
78 right = min(h.right, right);
84 intersect(Interval_t<T> x, Interval_t<T> const &y)
92 Interval_t<T>::str() const
98 return s + left + "," + right +"]";
103 Interval_t<T>::elt_q(T r)
105 return r >= left && r <= right;