[Newbies] closed and open interval

Cédrick Béler cdrick65 at gmail.com
Mon Nov 24 20:02:33 UTC 2008


>
> What do you need it for? As you can see in methods for Interval - there are
> two tests for include : rangeIncludes and valueIncludes (includes is both of
> them connected).
> First checks if a number is beetween borders and second if its enumerated
> (with stepping). In deed it contains both: finite and infinite progressions,
> but just in special cases.
> The question (already asked) is: what do you need it for?
> --

work on intervals... continu or symbolic
do union/intersection on them...
use association between an interval (continu right open) and a weight
(kind of probability distribution).
I'd also like to transform one into another (1) in (2):
(1) [0  0,25[ -> 0.3     [0,25  0,5[  -> 0.1    [0,5 0,75[  -> 0
[0,75  1]  -> 0.6
(2) [0  0,75[ -> 0,4    [0,75  1]  -> 0.6

At first try I used an array... and did manually the conversion but
I'd like now a more object oriented way... So I looked closer at
Interval and now I wonder how to represent bounded  continu values :)
I can use an Interval as you did though...

-- 
Cédrick


More information about the Beginners mailing list