On Nov 29, 2007, at 2:06 AM, Xavier Noria wrote:
Indeed, the iterator provided by Algorithm::Combinatorics is faster
only for lists of sizes >= 7. (And gets to be twice as fast for size
16.)
Certainly there's room for improvement here.
For the archives, I copied the iterator in List::Power
On Wednesday 28 November 2007 06:32, Dan Klose wrote:
> Hi list,
Hello,
> I am having a bad day and would really like some help (the coffee
> hasn't).
>
> I have a list that looks like:
> my @list = (1,2,3,4);
>
> I would like to generate all patterns that follow:
> 1
> 2
> 3
> 4
> 12
> 123
>
On Nov 28, 2007, at 10:37 PM, Xavier Noria wrote:
On Nov 28, 2007, at 9:54 PM, Xavier Noria wrote:
On Nov 28, 2007, at 8:58 PM, yitzle wrote:
In a personal email conversation, he realized what he was actually
looking for is the power set.
List::PowerSet
http://search.cpan.org/~nikc/List-Powe
yitzle schreef:
> In a personal email conversation, he realized what he was actually
> looking for is the power set.
> List::PowerSet
> http://search.cpan.org/~nikc/List-PowerSet-0.01/lib/List/PowerSet.pm
#!/usr/bin/perl
use strict;
use warnings;
use Data::Dumper;
sub powerset {
my $set = shif
On Nov 28, 2007, at 9:54 PM, Xavier Noria wrote:
On Nov 28, 2007, at 8:58 PM, yitzle wrote:
In a personal email conversation, he realized what he was actually
looking for is the power set.
List::PowerSet
http://search.cpan.org/~nikc/List-PowerSet-0.01/lib/List/PowerSet.pm
If speed is an issu
On Nov 28, 2007, at 8:58 PM, yitzle wrote:
In a personal email conversation, he realized what he was actually
looking for is the power set.
List::PowerSet
http://search.cpan.org/~nikc/List-PowerSet-0.01/lib/List/PowerSet.pm
If speed is an issue Algorith::Combinatorics provides subsets() in XS:
yeah sorry, I should have posted.
Thanks all for the solutions. Next time I will post if I get a
solution to the problem.
On 28 Nov 2007, at 19:58, yitzle wrote:
In a personal email conversation, he realized what he was actually
looking for is the power set.
List::PowerSet
http://search.cp
In a personal email conversation, he realized what he was actually
looking for is the power set.
List::PowerSet
http://search.cpan.org/~nikc/List-PowerSet-0.01/lib/List/PowerSet.pm
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.or
"Dan Klose" schreef:
> Hi list,
>
> I am having a bad day and would really like some help (the coffee
> hasn't).
>
> I have a list that looks like:
> my @list = (1,2,3,4);
>
> I would like to generate all patterns that follow:
> 1
> 2
> 3
> 4
> 12
> 123
> 23
> 34
> 234
> 1234
>
>
> The list
Dan Klose wrote:
Hi list,
I am having a bad day and would really like some help (the coffee hasn't).
I have a list that looks like:
my @list = (1,2,3,4);
I would like to generate all patterns that follow:
1
2
3
4
12
123
23
34
234
1234
The list can be of any length and the next number
ABC
> ABCD
> B
> BC
> BCD
> C
> CD
> D
>
> -Original Message-
> From: Andrew Curry [mailto:[EMAIL PROTECTED]
> Sent: 28 November 2007 15:43
> To: Dan Klose; beginners@perl.org
> Subject: RE: fixed list combinatorics
>
> Not sure this exactly w
}
$n++;
}
}
If this indeed what your asking.
A
AB
ABC
ABCD
B
BC
BCD
C
CD
D
-Original Message-
From: Andrew Curry [mailto:[EMAIL PROTECTED]
Sent: 28 November 2007 15:43
To: Dan Klose; beginners@perl.org
Subject: RE: fixed list combinatorics
Not sure this exactly what you wan
On Nov 28, 2007 9:32 AM, Dan Klose <[EMAIL PROTECTED]> wrote:
> I did look at the Combinatorics module however it does
> not impose fixed ordering as far as I can see.
Yet the example seems to indicate that the order is followed...
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional comm
Runs and returns
1
12
123
1234
2
23
234
3
34
4
-Original Message-
From: Dan Klose [mailto:[EMAIL PROTECTED]
Sent: 28 November 2007 14:32
To: beginners@perl.org
Subject: fixed list combinatorics
Hi list,
I am having a bad day and would really like some help (the coffee hasn't)
Hi list,
I am having a bad day and would really like some help (the coffee hasn't).
I have a list that looks like:
my @list = (1,2,3,4);
I would like to generate all patterns that follow:
1
2
3
4
12
123
23
34
234
1234
The list can be of any length and the next number in the list must be
15 matches
Mail list logo