Mersenne Twister is a random number generator algorithm that produces a sequence of high-quality pseudo-random numbers.
If you're interested in learning more about MersenneTwister, you can head to the inventors' page for more detail. Alternatively, you can download the complete package in zip or tarball format to see for yourself what this class can do.
MersenneTwister has a number of key features that make it stand out from the crowd. Firstly, it's incredibly easy to create a generator with MTRand r, and to access it with double a = r(). You can use this class to generate both integers and floating-point numbers, and there are a range of seeding options, including automatic seeding from /dev/urandom or time() and clock(). You can even use MersenneTwister to generate single integers, or to create arrays of any length to access the full 19937-bit range. And if you need to save and restore state, this class can help you with that too.
If you're interested in trying out MersenneTwister, you'll be pleased to know that it comes with a thorough example program, as well as validation and performance tests. Plus, it's available under an open source code license, so you're free to modify and distribute it as you see fit.
As for performance, MersenneTwister really shines. On a Pentium III running Linux at 500 MHz, the performance test shows that MersenneTwister can generate 28.4 million random integers per second - more than double the rate of the next best generator on the list. This makes it an excellent choice for anyone who needs to generate a large number of random numbers quickly and reliably.
Version 1.1: N/A