NAME
Math::Partition::Rand - Partition a number into addition sequences
VERSION
version 0.01
SYNOPSIS
use Math::Partition::Rand;
my $p = Math::Partition::Rand->new( top => 1, n => 3 );
my %d = $p->choose();
DESCRIPTION
A Math::Partition::Rand
partitions a number (top) into a given number of addition sequences (n).
NAME
Math::Partition::Rand - Partition a number into addition sequences
METHODS
new()
$x = Math::Partition::Rand->new(%arguments);
Create a new Math::Partition::Rand
object.
Arguments and defaults:
top => 1,
n => 2,
choose()
my %hash = $self->choose();
Partition the given number, top into addition n parts.
Example: For top = 1, n = 3
{ 0 => 0.228102577310889,
1 => 0.0880906485615138,
2 => 0.683806774127597 }
AUTHOR
Gene Boggs <gene@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2017 by Gene Boggs.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.