
Boost : 
From: Joel Young (jdy_at_[hidden])
Date: 20020904 15:17:18
One more thing. For defining comparison relations on intervals and examing
properties of these relations, I have found the following technique
useful:
Envision an open halfplane defined by all the points above the line x =
y.
This halfplane defines the space of valid intervals. Each interval
[a,b] is mapped to a the plane by using a as the x coordinate and b as
the y coordinate.
Now pick an arbitrary point in the halfplane. Call this point interval
A. Now divide the plane around A into a set of exhaustive and mutually
exclusive partitions. Note that some of these partitions may have zero
area (line segments, etc.). (exercise to reader: draw on graphpaper
the partitioning for the standard 13 intervalinterval relations, the
intervalpoint relations, pointinterval relations, and the pointpoint
relations).
Now using your paritioning one can take a second interval B. Place it on the
plane properly relative to A and immediately determine which relation
holds from A to B.
Using this geometric approach one can view the "meaning" of any
arbitrary set of comparison relations. One can use it to provide a
geometric proof of correctness where an analytic proof might be rather
verbose.
Consider how open and halfopen intervals affects the situation... the
interesting places are the partitions which have zero area like meets
which is just a line. open intervals can't really meet. or also
interesting is equals...it is only a single point on the plain.
Joel
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk