
Integer::Partition - Generate all integer partitions of an integer

This document describes version 0.01 of Integer::Partition, released 2007-xx-xx.

use Integer::Partition;
my $i = Integer::Partition->new(4);
while (my $p = $i->next) {
print join( ' ', map { "(@$_)" } @$p ), $/;
}
# produces
4
3 1
2 2
2 1 1
1 1 1 1

Integer::Partition takes an integer number and produces an object that can be used to generate all possible integer partitions of the original number in reverse lexographic order.

Creates a new Integer::Partition object. Takes an integer as a parameter.
Returns the partition, or undef when all partitions have been generated.
Resets the object, which causes it to enumerate the arrangements from the beginning.
$p->reset; # begin again

None.

None.


Please report all bugs at http://rt.cpan.org/NoAuth/Bugs.html?Dist=Set-Partition|rt.cpan.org
Make sure you include the output from the following two commands:
perl -MSet::Partition -le 'print $Integer::Partition::VERSION' perl -V

TODO

David Landgren, copyright (C) 2007. All rights reserved.
If you (find a) use this module, I'd love to hear about it. If you want to be informed of updates, send me a note. You know my first name, you know my domain. Can you guess my e-mail address?

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.