
Boost : 
From: David Bergman (davidb_at_[hidden])
Date: 20020905 15:28:30
I agree (as usual ;),
I think it could be refreshening to discuss the relations (orderings and
not) we would want on intervals, without using operator overloading, and
then, if at all, decide to use those "wellknown" operators for properly
sound relations. That way, we could avoid infective discussions based on
one's personal relationship with those specific syntactic operators ;)
And, yes, '<=' should be defined (as '<  =='). What I meant was
"defined as '!>'".
/David
Original Message
From: boostbounces_at_[hidden]
[mailto:boostbounces_at_[hidden]] On Behalf Of Joel Young
Sent: Thursday, September 05, 2002 4:15 PM
To: boost_at_[hidden]
Cc: jdy_at_[hidden]
Subject: Re: [boost] Interval Library and comparison operators
Hi David,
I added your three partitionings to my page.
http://www.cs.brown.edu/people/jdy/intervals/
If one wants the relation deduction to work as expected in the language
then I believe the partitions need to be complete. That means that if
you specify < and == then > must be everything else? The everything
else can be troubling.
If we have partial orderings then that is fine by me. I have no trouble
with that. Just don't assume that the definition of ">" is obvious when
"<" is provided and vice versa.
> Partial orderings always have, and should have, these "undefined
> regions". What is the problem with that?
Nothing,
> Forcing those regions to be defined by either (1) introducing
> inconsistencies, such as defining '<=' or (2) using obscure tribools
> will not help.
Doesn't the behavior we would like out of the standard library/STL force
us to do that? Does "not less than" need to be deducible from < and ==?
I agree absolutely that <= should be < .or. == . My original point was
that forcing pointpoint relations on intervals is troublesome...
If the underlying number system isn't totally ordered then things can
get really fun. I haven't thought about that very much at all.
I guess what it comes down to is that "<, ==, >" is not rich enough a
language to discuss the relationships between intervals. I got the
impression that people were falling into a trap with naive choices for
== and < and then expecting the deduced operations to have some useful
meaning in C++.
Joel

From: "David Bergman" <davidb_at_[hidden]>
Date: Thu, 5 Sep 2002 14:41:37 0400
To: <boost_at_[hidden]>
Subj: RE: [boost] Interval Library and comparison operators
Joel,
No matter what ordering chosen, the equivalence and '<=' syntactic sugar
(yes, it should be regarded as syntactic sugar for '<  ==') still
should be as proposed by you.
So, back to the ordering. Which one is the most natural choice? Hmm,
there are obviously three orderings that popup:
1. The lexicographic (yes, that is a properly chosen name) ordering,
where ' [a1, a2] < [b1, b2] ' iff ' a1 < b1  a1 == b1 && a2 < b2 '
2. The (strict; some people are strict about strictness ;) subset
ordering, where ' A < B ' iff A is a subset of B; when all end points
reside in the same chain, this is reduced to ' b1 <= a1 && a2 <= b2 &&
!(A == B) '
3. The "complete position" ordering (have no proper name for it...),
where ' [a1, a2] < [b1, b2] ' iff ' a2 < b1 && a1 < b1 ' the extra
conjunct ' a1 < b1 ' is needed to ensure that all end points are in the
same chain, since we else can get A < B && B < A, if the points lie in a
circle.
Note that all these orderings are nontotal if the underlying "number"
system is not totally ordered.
In the case the underlying "number" system is totally ordered, ordering
(1) is the only one being total. We have obviously discussed ordering
(3) the most in this thread.
Partial orderings always have, and should have, these "undefined
regions". What is the problem with that? Forcing those regions to be
defined by either (1) introducing inconsistencies, such as defining '<='
to be '!>', or (2) using obscure tribools will not help.
We all have to realize that at least two of the orderings above are
partial, there is not much we can do about it.
No matter what ordering chosen, '<=' should be regarded as syntactic
sugar for '<  ==' in the case there exists an equivalence, such as
here...
I must be extremely stupid/ignorant not to see the problem by these
fairly straightforward definitions, so I hope someone will enlighten
me, so I also can join the "tribool and complex ordering" choire ;)
David
Original Message
From: boostbounces_at_[hidden]
[mailto:boostbounces_at_[hidden]] On Behalf Of Joel Young
Sent: Thursday, September 05, 2002 2:13 PM
To: boost_at_[hidden]
Cc: jdy_at_[hidden]
Subject: Re: [boost] Interval Library and comparison operators
From: "David Bergman" <davidb_at_[hidden]>
> Guillaume,
>
> What is the rationale behind *not* defining
>
> [a, b] == [c, d] as a == c && b == d
>
> And
>
> A <= B A < B  A == B
The key question is how are you going to define less than and still keep
it symmetric with greater than and not have an undefined region?
When you project the rich intervalinterval relation space into only
three relations, it is nontrivial to have a nice projection that
maintains a nice definition of equality.
Joel
_______________________________________________
Unsubscribe & other changes:
http://lists.boost.org/mailman/listinfo.cgi/boost
_______________________________________________
Unsubscribe & other changes:
http://lists.boost.org/mailman/listinfo.cgi/boost
_______________________________________________
Unsubscribe & other changes:
http://lists.boost.org/mailman/listinfo.cgi/boost
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk