Math::Partition::Rand - Random floating point additive partitions
use Math::Partition::Rand; my $partition = Math::Partition::Rand->new( top => 1, n => 3 ); my $distribution = $partition->choose(); # [ 0.228102577310889, 0.0880906485615138, 0.683806774127597 ]
Math::Partition::Rand object does one thing: it partitions a number (top) into a given number of "random addition sequences" (n).
$partition = Math::Partition::Rand->new(%arguments);
Create a new
Arguments and defaults:
top => 1, n => 2,
$distribution = $partition->choose; # [ 0.3161932258724, 0.683806774127597 ] for instance
Partition the given number top into addition n sequences.
Gene Boggs <email@example.com>
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.