A first public release of Random is now available. See README below
for details and get it from:
It has only been tested on linux so far and is only available as a gem.
If someone is willing to compile it on windows and mac os x so we can
have pre-compiled gems please email me.
Best regards and happy easter,
= Random - Ruby classes for pseudorandom number generation
This package contains Random, a ruby extension adding classes for
generating pseudorandom number generation (PRNG).
Random has the following features:
A fast PRNG implemented in C and wrapped in a Ruby class. The
algorithm is the well-known and widely used MersenneTwister.
Multiple independent random streams can be active at the same time
(since the PRNG is wrapped in a class and objects of that class are
PRNG objects supports marshaling.
This is in contrast to Ruby’s standard srand/rand methods. Even though
the standard methods use the same PRNG algorithm (the MersenneTwister)
only a single (global) PRNG exists for each ruby invocation and its
state cannot be saved to disc. Random alleviates these problems. This
is especially important for scientific and simulation applications.
The latest version of Random can be found at
=== GEM Installation
Download and install Random with the following.
gem install --remote random
=== Running the Random Test Suite
Random comes with an extensive test suite. If you wish to run it:
CD into the top project directory of random.
rake # If you have a version of rake installed
== Online Resources and References
- Documentation Home: coming!
- Project Page: http://rubyforge.org/projects/random
- API Documents: coming!
== Simple Example
Once installed, you can use random as follows:
[Richard Wagner] For the C++ implementation of the
MersenneTwister which is the basis for Random::MersenneTwister.
Random is available under a BSD-style license.
Feel free to submit commits or feature requests. If you send a patch,
please also update and send the corresponding unit tests.
It would be great to get help with creating pre-compiled gems of this
to simplify for users that do not have a build environment. Please
email if you can help with this (especially for non-linux targets).
For other information, feel free to ask on the ruby-talk mailing list
(which is mirrored to comp.lang.ruby) or contact
= Other stuff
Author:: Robert F. [email protected]
Requires:: Ruby 1.8.2 or later (but only tested with 1.8.4)
License:: Copyright 2006 by Robert F.
Released under a BSD-style license. See the LICENSE file
included in the distribution.