|
Boost : |
From: Joel Young (jdy_at_[hidden])
Date: 2002-09-04 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 half-plane defined by all the points above the line x =
y.
This half-plane 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 half-plane. 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 graph-paper
the partitioning for the standard 13 interval-interval relations, the
interval-point relations, point-interval relations, and the point-point
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 half-open 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