[Newbies] closed and open interval

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


2008/11/24 Filip Malczak <filet00 at gmail.com>:
> Hmm... When you were talking I wasnt aware of discussion and made up some
> basis for this subclass. I send it with this mail.

Thanks Filip. I'll have a look into it :)

>
> Now Im gonna work on Intervals arithmetics to each other, for example:
> OpenedInterval from: 1 to: 5 right: true sumWith Interval from: 5 to: 8
> should give
> Interval (or OpenedInterval) from: 1 to: 8 (both borders closed, so no
> difference).
>

Yes this is the kind of operation we can provide (union/intersection).

The more I think to it, the more I find Interval might not be the good
candidate to subclass.
I find Interval correspond to an ordered collection where each element
(numbers) difference with its successor is the step.
So Interval is a collection of discrete values.

I think Interval open/closed (the one I'd like to have) is a
"collection" for continues values (infinite element?)... So maybe it's
ok for an implementation to subclass Interval but I don't think it's
correct.

Interval -> "I represent a finite arithmetic progression."
What about infinite arithmetic progression ? ;)

Can a collection contain an infinite number of elements... ?
[0 1[ could represent the collection of **all number** between 0 and 1 excluded.


Thanks


> After finishing this Im gonna try to make make some Interval converting,
> beginning from asOpenedInterval (what should give OpenedInterval with left
> and right false).
>
> --
> Pozdrawiam:
> Filip
> GG: 2486889
> mail: filet00 at gmail.com
>
> _______________________________________________
> Beginners mailing list
> Beginners at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>
>



-- 
Cédrick


More information about the Beginners mailing list