7 const Real INFTY = HUGE;
10 Interval::set_empty() {
16 Interval::length() const {
22 Interval::unite(Interval h)
32 Interval::intersect(Interval h)
34 min = MAX(h.min, min);
35 max = MIN(h.max, max);
39 intersection(Interval a, Interval const&b)
47 Interval::compare(const Interval&a,Interval const&b)
49 if (a.min == b.min && a.max == b.max)
52 if (a.min <= b.min && a.max >= b.max)
55 if (a.min >= b.min && a.max <= b.max)
58 assert(false); // not comparable
64 intersect(Interval x, Interval const &y)
77 return s + min + "," + max +"]";
80 Interval::elt_q(Real r)
82 return r >= min && r <= max;