Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Generator of integer partitionts of n

by blokhead (Monsignor)
on Aug 28, 2004 at 06:59 UTC ( #386571=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $n    = shift || 10;
    my $iter = int_partitions($n);
    ...
            return map { ($_) x $tally[$_] } reverse 1 .. $n;
        };
    }
    
  2. or download this
    my @set  = @ARGV ? @ARGV : 1 .. 4;
    my $iter = set_partitions(@set);
    ...
            return @return;
        };
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://386571]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (6)
As of 2023-12-07 17:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?











    Results (33 votes). Check out past polls.

    Notices?