|
Boost : |
From: David Bergman (davidb_at_[hidden])
Date: 2002-09-05 14:09:27
Why do people not seem to have a problem with the subset relation of
sets being partial when it causes so much confusion and distress when
dealing with intervals?
Why do those people not also mandate '<=' to be '!>' for sets?
With that "logic", (excuse me for introducing a new constructor...)
' std::set<int>({1, 2, 3}) <= std::set<int>({4})
Should hold, since the second set is not '<' than the first one.
I think we could reach a better conclusion by first viewing the interval
from a set-theoretic viewpoint, and then allow for other orderings (such
as lexicographic or "completely to the left of").
David "not confused, but probably missing something fundamental" Bergman
-----Original Message-----
From: boost-bounces_at_[hidden]
[mailto:boost-bounces_at_[hidden]] On Behalf Of Dave Gomboc
Sent: Thursday, September 05, 2002 2:50 PM
To: Boost Mailing List
Subject: [boost] Re: Interval Library and comparison operators
> > 1) Don't support any comparison operators, or
> > 2) Use comparison policies
>
> 3) Pick a fixed meaning for the comparison operators, and provide
> function (object)s for the other kinds of comparison.
Judging from the variety of different, conflicting definitions that
other interval arithmetic libraries use, and the varied proposals that
Boosters have brought forth, it seems that no particular comparison
operation has a clearly most valid claim to operator<= and the like.
Therefore, I don't think that assigning one meaning to them is
appropriate: no matter the definition selected, mnay users would find it
counter-intuitive and expect an alternate definition. I think it would
be best if all 13 relations Joel Young suggested be provided (meets,
precedes, etc.) and either of the following done:
a) prohibit definition of relational operators such as <= entirely
(declare them private and do not define them)
or
b) allow the library user to overload the relational operators
as they see fit for their application (which is easily done if
implementations of the 13 relations are already provided).
Dave
_______________________________________________
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