On Nov 19, 2005, at 10:31, Xavier Noria wrote:

On Nov 19, 2005, at 9:48, David Landgren wrote:

And Xavier Noria did write:

On Nov 17, 2005, at 22:45, David Landgren wrote:
People,

I have a simple module written and as far as I can tell, there's nothing on CPAN that does this. (Algorithm::Permute might, but it segfaults on my machine).
There are some modules dealing with this kind of stuff, with more generic interfaces. For instance Math::Combinatorics or Algorithm::Combinatorics.

I've had a long look at Math::Combinatorics, and while it could be used to generate a power set, it would take a certain amount of make-work code.

Well, with Algorithm::Combinatorics, which I know better, you'd just do:

    my @power_set = ();
    push @power_set, combinations([EMAIL PROTECTED], $_) for [EMAIL PROTECTED];

I want to be more explicit there, just in case.

I don't mean that since the power set can be computed that way there's no room for your module. And, of course, the fact that Algorithm::Combinatorics is mine is anecdotal, I would provide the same feedback if the module was from someone else (as I did with Math::Combinatorics).

I just wanted to say that there exist modules to compute the power set in a short albeit indirect way, so you take an informed decision. If you decide that you'd like to provide an explicit, clear way to construct power sets with a dedicated module that's fine and makes sense!

-- fxn

Reply via email to