[Facets] Range#overlap?

Hi,

I've worked in systems requiring temporal and interval logics for years. Here is something I can pretty much guarantee: if you don't get your terminology right you are going to spend almost all of your time trying to figure out what each other is saying. Allen's terminology is described and illustrated on page 10 of the paper:

[1] Allen, J.F. and Ferguson, G. Actions and Events in Interval
Temporal Logic, J. Logic and Computation 4, 5, 1994.
http://tinyurl.com/2twek7

There are 14 relationships described in that paper, 12 relationships illustrated plus equal and disjoint which I guess the authors felt too trivial to be worth illustrating. Allen's work in the early 80s is the first widely accepted systematic terminology available and is the vocabulary pretty much *everyone* who talks about intervals regularly uses.

Anyway...

I see a potential flaw in this if the ends were equal but other has exclude end.

a: |-----| (1...6, exclude end)
b: |---| (3..6)

a.include?(6) #=> false
b.include?(6) #=> true

a.span?(b) #=> false
b.span?(a) #=> true, but should be false, IMHO.

I don't know what either 'include' or 'span' actually means. And from this question Daniel asks, it isn't just me.

You'll get a lot futher a lot faster if you use Allen's terminology.

You know, this probably is worth writing up as a trivial library and sharing... but how to represent an interval :slight_smile:

Cheers,
Bob

···

On 21-Feb-07, at 5:23 AM, Pierre-Charles David wrote:
On 21-Feb-07, at 11:32 PM, Daniel Finnie wrote:

----
Bob Hutchison -- blogs at <http://www.recursive.ca/hutch/&gt;
Recursive Design Inc. -- <http://www.recursive.ca/&gt;
Raconteur -- <http://www.raconteur.info/&gt;
xampl for Ruby -- <http://rubyforge.org/projects/xampl/&gt;

I've worked in systems requiring temporal and interval logics for years.
Here is something I can pretty much guarantee: if you don't get your
terminology right you are going to spend almost all of your time trying to
figure out what each other is saying. Allen's terminology is described and
illustrated on page 10 of the paper:

<snip>

You know, this probably is worth writing up as a trivial library and
sharing... but how to represent an interval :slight_smile:

indeed. if people are looking fo a concrete example of why these definitions
are important, including some nice confusing examples, see

   http://codeforpeople.com/lib/ruby/btpgsql/btpgsql-0.2.4/doc/

regards.

-a

···

On Thu, 22 Feb 2007, Bob Hutchison wrote:
--
be kind whenever possible... it is always possible.
- the dalai lama