i think this goes back to the discussion about whether it was necessary 
to have all the different kinds of intervals (half-open, closed and 
open) within joda. i argued at the time that we'd eventually have 
difficulties unless they were all allowed.

so for instance, i don't think the interval [9:00, 9:00) is well defined 
to begin with. it has to be [9:00, 9:00] to make sense. i think [9:00, 
9:00) is illegal, there should be no way to construct or calculate it.

once you allow all the interval types, i think all these relationships 
are clearer. so for instance

[9:00, 10:00) does contain, abut and overlap [9:00, 9:00]
[9:00, 10:00) does not contain [10:00, 10:00]
[9:00, 10:00) does abut [10:00, 10:00], and depending on the definition 
of abut, may or may not abut (10:00, 11:00]
[9:00, 10:00) does not overlap [10:00, 10:00]

of course, if you allow all interval types, you have to careful about 
defining operations like concatenation and equality. for instance are 
you allowed to concatenate [9:00, 9:30) and (9:30, 10:00]? IMO no, it 
doesn't make sense, and it isn't necessary. is [9:00, 10:00] equal to 
[9:00, 10:00). again no. are their lengths equal? yes.

i believe introducing all the interval types is the only solution that's 
going to cover all the exotic cases, present and future.

regards,

al

Stephen Colebourne wrote:
> In case anyone is wondering, I've been trying to tidy up loose ends to 
> finally get this out.
> 
> The first loose end was the 'find next' concept. This sounded easy, but 
> is in fact very hard. The problem is with DST shifts, where the same 
> time appears twice in quick succession. For now, I've shelved this work.
> 
> The second loose end is trying to work out if a previous bug fix for 
> empty intervals was valid. Are there any mathematicians present?
> 
> 
> Consider an interval from 09:00 to 10:00. Its half-open - [09:00,10:00).
> 
> Does this interval contain an empty interval [09:00,09:00) ?
> Does this interval abut an empty interval [09:00,09:00) ?
> Does this interval overlap an empty interval [09:00,09:00) ?
> 
> As far as I can tell, there is no 'right' answer to this as an empty 
> interval is rather ill-defined. Do you consider it as a point on the 
> timeline (thus it is contained and abuts). Or do you consider it as 
> starting at and excluding 09:00 (thus it is not contained as it excludes 
> 09:00, but does abut)
> 
> Any of this make any sense? Anyone know interval theory?
> 
> Stephen
> 
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Joda-interest mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/joda-interest
> 
> 


Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Joda-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/joda-interest

Reply via email to