[std-interval] Interval comparison operators

Guillaume Melquiond guillaume.melquiond at ens-lyon.fr
Sun May 28 16:59:49 PDT 2006


Le dimanche 28 mai 2006 à 05:02 +0000, first.i.last at comcast.net a
écrit :
> >  Now we are interested in what the opinions of
> > other interval developers are. Should the user be allowed to
> > compare intervals in C++? And if so, what should the semantic
> > of these comparisons be?
> 
> The attached file contains our detailed response to the issue of
> comparison of intervals.  Readers interested in specifics without
> explanation or rationale should not read it.

I have taken a quick look at your document and I have a few questions.

First, I'm a bit confused. You are speaking of "subsets of the machine
number line" while the proposal is clearly aimed at representing
(convex) subsets of the real number line. I hope this was only an
oversight.

I do not understand what you mean by "Present day STL experts may be
mislead by the set-based description of intervals, but would not be
confused by a line-segment-based description of intervals". According to
the previous paragraph of your document, I thought this was supposed to
be the exact same notion. Also how would it achieve not to confuse them?
STL comparison operators are lexicographic total ordering while your
line-segment comparison operators are inclusion partial ordering (or
perhaps they aren't?). Later you also say that "they are also fully
compatible with the STL". This does not strike me as obvious since STL
algorithms usually require this property to hold: !(x < y) && !(y < x)
implies that x and y are equivalent.

Concerning your neighborhood model, I disagree. You are saying that "the
certain and possible comparison functions are based on this model". But
somebody performing global optimization or value-range propagation will
use them, while the intervals are nothing like a neighborhood. So
certain and possible comparisons should not be associated to a "point
model" in my opinion.

Do you have some bibliographic references for the principal value model?
This looks like a center-radius model of intervals, but this isn't it,
so I'm a bit lost. For now, I will just ask how different is the "loose"
comparaison from the "possible" comparison. Since the "loose" comparison
is using "the implicit epsilon provided by the radius of the actual
intervals", it seems to me the results will always be the same. Also you
are saying this model appeals to a "much wider audience"; could you give
some examples where it is used?

Later, you say that "empty interval arguments should always yield
false". This statement contradicts your line-segment model, since the
empty set is included in every set. It also goes against your
neighborhood model, since the classical interpretation is: if something
is not possible, then its contrary is certain (and reciprocally).

Your overload of the shift operators looks like a nice idea to me.

Finally, you are proposing that the interval operators compare their
midpoint. This kind of goes against the whole point of providing
interval arithmetic so that people can do certified computations. So I
am a bit reluctant to consider your proposal.

Best regards,

Guillaume



More information about the Std-interval mailing list