7 const Real INFTY = HUGE;
10 Interval::set_empty() {
16 Interval::length() const {
21 Interval::unite(Interval h)
29 Interval::intersect(Interval h)
31 min = MAX(h.min, min);
32 max = MIN(h.max, max);
35 intersection(Interval a, Interval const&b)
42 Interval::compare(const Interval&a,Interval const&b)
44 if (a.min == b.min && a.max == b.max)
47 if (a.min <= b.min && a.max >= b.max)
50 if (a.min >= b.min && a.max <= b.max)
53 assert(false); // not comparable
59 intersect(Interval x, Interval const &y)
66 Interval::operator String() const
72 return s + min + "," + max +"]";
75 Interval::elt_q(Real r)
77 return r >= min && r <= max;