Re: Range and continuous intervals

2009-03-01 Thread Jon Lang
ecause this > is the last value in the Range. Only in 4.7 ~~ 1..^5 does the five > matter. How does ~~ retrieve that information? For open intervals > the .min and .max methods should return the bound outside. Or better, > we should introduce infimum and supremum as .inf and .sup respect

Re: Range and continuous intervals

2009-03-01 Thread TSa (Thomas Sandlaß)
type comes from supporting set operations (&), (|) etc. which are still unmentioned in S03. BTW, what does (1..^5).max return? I think it should be 4 because this is the last value in the Range. Only in 4.7 ~~ 1..^5 does the five matter. How does ~~ retrieve that information? For open interval

Re: Range and continuous intervals

2009-02-28 Thread Dave Whipp
Jon Lang wrote: Keys, OTOH, don't have any such requirement; so continuous keys may very well be doable. If they _are_ doable, you have to ask questions such as "how do I assign values to a continuous interval of keys?" To truly be robust, we ought also answer this question in terms of multidi

Re: Range and continuous intervals

2009-02-28 Thread Darren Duncan
Jon Lang wrote: Darren Duncan wrote: What I'm proposing here in the general case, is a generic collection type, "Interval" say, that can represent a discontinuous interval of an ordered type. A simple way of defining such a type is that it is a "Set of Pair of Ordered", where each Pair defines

Re: Range and continuous intervals

2009-02-28 Thread Jon Lang
Darren Duncan wrote: > In reply to Jon Lang, > > What I'm proposing here in the general case, is a generic collection type, > "Interval" say, that can represent a discontinuous interval of an ordered > type.  A simple way of defining such a type is that it is a "Set of Pair of > Ordered", where eac

Re: Range and continuous intervals

2009-02-28 Thread Mark Biggar
Darren Duncan wrote: In reply to Jon Lang, What I'm proposing here in the general case, is a generic collection type, "Interval" say, that can represent a discontinuous interval of an ordered type. A simple way of defining such a type is that it is a "Set of Pair of Ordered", where each Pair

Re: Range and continuous intervals

2009-02-28 Thread Darren Duncan
f it matches a point within a continuous sub-interval of the Interval. So, and Interval is set-like, but it is not enumerable (except for being able to enumerate the set of continuous sub-intervals), and it also has a sense of being ordered since its sub-interval elements (especially when nor

Re: Range and continuous intervals

2009-02-27 Thread Jon Lang
" (or, in the case of Junctions, "autothread the members") simply isn't feasible with a continuous key. One question is whether Intervals should be Positional (i.e., list-like) or Associative (i.e., Set-like). The former has the advantage that Ranges are Positional, meaning th

Re: Range and continuous intervals

2009-02-27 Thread Darren Duncan
of an ordered type and includes all the values between those, but unlike Range that type is not expected to have discrete consecutive values that can be iterated over. Note that smart-matching currently treats Range as an interval. The question is whether we need intervals for any other purpose. If

Re: Range and continuous intervals

2009-02-27 Thread Jon Lang
r. Note that smart-matching currently treats Range as an interval. The question is whether we need intervals for any other purpose. If we do, perhaps we could still press Range into service, but indicate that there are no discrete consecutive values by saying something like ":step(0)&qu

Range and continuous intervals

2009-02-26 Thread Darren Duncan
h Rat|Num or Instant etc, and not just Int etc. There would be operators to test membership of a value in the interval, and set-like operators to compare or combine intervals, such as is_inside, is_subset, is_overlap, union, intersection, etc. Such an interval would be what you use for inexact m

Re: Intervals

2005-05-23 Thread Luke Palmer
On 5/23/05, Edward Peschko <[EMAIL PROTECTED]> wrote: > They have the intent (Alan Eliasen has the intent) of implementing 'intervals' > which match fuzzy values where you know an approximate extent of the value, > but > not the value itself. E.g > >

Intervals

2005-05-23 Thread Edward Peschko
Just came across something cool on the frink mailing list - was wondering if perl6 had any intention on implementing this, or if not natively, ideas on what would be the best way of implementing it in perl6. They have the intent (Alan Eliasen has the intent) of implementing 'intervals&#x