|o||Uniform Math::Random::OO::Uniform (uniform distribution over a range)|
|o||UniformInt Math::Random::OO::UniformInt (uniform distribution of integers over a range)|
|o||Normal Math::Random::OO::Normal (normal distribution with specified mean and standard deviation)|
|o||Bootstrap Math::Random::OO::Bootstrap (bootstrap resampling from a non-parameteric distribution)|
All Math::Random::OO subclasses must follow a standard interface. They must provide a new method, a seed method, and a next method. Specific details are left to each interface.
CWnewThis is the standard constructor. Each subclass will define parameters specific to the subclass.
CWseed$prng->seed( @seeds );
This method takes seed (or list of seeds) and uses it to set the initial state of the random number generator. As some subclasses may optionally use/require a list of seeds, the interface mandates that a list must be acceptable. Generators requiring a single seed must use the first value in the list.
As seeds may be passed to the built-in srand() function, they may be truncated as integers, so 0.12 and 0.34 would be the same seed. Only positive integers should be used.
CWnext$rnd = $prng->next();
This method returns the next random number from the random number generator. It does not take (and must not use) any parameters.
This is not an exhaustive list search CPAN for that but represents some of the more common or established random number generators that Ive come across.
Math::Random multiple random number generators for different distributions (a port of the C randlib) Math::Rand48 perl bindings for the drand48 library (according to perl56delta, this may already be the default after perl 5.005_52 if available) Math::Random::MT The Mersenne Twister PRNG (good and fast) Math::TrulyRandom an interface to random numbers from interrupt timing discrepancies
Please report any bugs or feature requests through the issue tracker at <https://github.com/dagolden/math-random-oo/issues>. You will be notified automatically of any progress on your issue.
This is open source software. The code repository is available for public review and contribution under the terms of the license.
git clone git://github.com/dagolden/math-random-oo.git
David Golden <firstname.lastname@example.org>
This software is Copyright (c) 2013 by David Golden.
This is free software, licensed under:
The Apache License, Version 2.0, January 2004
|perl v5.20.3||MATH::RANDOM::OO (3)||2013-06-09|