Thank you for the suggestions and discussion .
Regards.
Maurizio.
2011/12/6 Mark Engelberg
> Check out Algorithm T in chapter 7.2.1.3 of Knuth, volume 4A part 1.
> Put your items into a vector, and use Algorithm T to generate the
> indices of the elements to extract.
> __
Check out Algorithm T in chapter 7.2.1.3 of Knuth, volume 4A part 1.
Put your items into a vector, and use Algorithm T to generate the
indices of the elements to extract.
_
For list-related administrative tasks:
http://lists.racket-lang.org/listin
On Dec 5, 2011, at 4:24 PM, "Jos Koot" wrote:
> If there is a less-than predicate for the elements of the list, the list can
> be sorted and things may be speeded up, I think.
In fact, if there's a total, antisymmetric relation on the elements of the
list, you don't even need to sort the list;
21:17
To: Ryan Culpepper
Cc: users@racket-lang.org
Subject: Re: [racket] shortest paths, resource allocation/scheduling
Three hours ago, Ryan Culpepper wrote:
> Here's the basic idea:
>
> ;; subsets-of-size : nat list -> (listof list)
> (define (subsets-of-size n l)
>(con
Three hours ago, Ryan Culpepper wrote:
> Here's the basic idea:
>
> ;; subsets-of-size : nat list -> (listof list)
> (define (subsets-of-size n l)
>(cond [(zero? n) (list null)]
> [else
> (for*/list ([ne-list (pair-fold-right cons null l)]
> [subsetN-1
On 12/05/2011 09:20 AM, Maurizio Giordano GMAIL wrote:
On Mon, 2011-12-05 at 09:00 -0700, Ryan Culpepper wrote:
On 12/05/2011 08:40 AM, Sam Tobin-Hochstadt wrote:
On Mon, Dec 5, 2011 at 10:00 AM, Geoffrey S. Knauth wrote:
I'm wondering if there is something in the now very rich set of Racket
Wow, Veer, Sam, Ryan, Stephen, that kind of answers my question [keeping
writing], but your ideas are also very valuable! Thank you!
Geoff
_
For list-related administrative tasks:
http://lists.racket-lang.org/listinfo/users
On Mon, 2011-12-05 at 09:00 -0700, Ryan Culpepper wrote:
> On 12/05/2011 08:40 AM, Sam Tobin-Hochstadt wrote:
> > On Mon, Dec 5, 2011 at 10:00 AM, Geoffrey S. Knauth
> > wrote:
> >> I'm wondering if there is something in the now very rich set of Racket
> >> libraries that already does this. Let
I am not too sure if this is less than quadratic ??
(define points (list->vector '(a b c d e f)))
(define l (vector-length points))
(define (gen org start end)
(for/list ([n (in-range start end )])
(cons (vector-ref points org ) (vector-ref points n
(for/fold ([accum empty]) ([i (in-r
On 12/05/2011 08:40 AM, Sam Tobin-Hochstadt wrote:
On Mon, Dec 5, 2011 at 10:00 AM, Geoffrey S. Knauth wrote:
I'm wondering if there is something in the now very rich set of Racket
libraries that already does this. Let's say I have 5 points {A,B,C,D,E}. I
want to interconnect all of them:
On Mon, Dec 5, 2011 at 10:00 AM, Geoffrey S. Knauth wrote:
> I'm wondering if there is something in the now very rich set of Racket
> libraries that already does this. Let's say I have 5 points {A,B,C,D,E}. I
> want to interconnect all of them:
>
> {AB,AC,AD,AE,AF,BC,BD,BE,BF,CD,CE,CF,DE,DF,EF
On Dec 5, 2011, at 10:00 AM, Geoffrey S. Knauth wrote:
> I'm wondering if there is something in the now very rich set of Racket
> libraries that already does this. Let's say I have 5 points {A,B,C,D,E}. I
> want to interconnect all of them:
>
> {AB,AC,AD,AE,AF,BC,BD,BE,BF,CD,CE,CF,DE,DF,EF}
I'm wondering if there is something in the now very rich set of Racket
libraries that already does this. Let's say I have 5 points {A,B,C,D,E}. I
want to interconnect all of them:
{AB,AC,AD,AE,AF,BC,BD,BE,BF,CD,CE,CF,DE,DF,EF}
That's 15 edges rather than the 5x5=25 that a dumb interconnect wo
13 matches
Mail list logo