#include <adevs_rand.h>
Public Member Functions | |
| mtrand (unsigned long seed=1) | |
| Create a generator with an unsigned long seed. | |
| mtrand (const unsigned long *seed_array) | |
| Create a generator with an arbitrary length seed. | |
| mtrand (const mtrand &src) | |
| Copy constructor performs a deep copy. | |
| const mtrand & | operator= (const mtrand &src) |
| Assignment operator does a deep copy. | |
| void | set_seed (unsigned long seed) |
| Set the seed. | |
| random_seq * | copy () const |
| Create a copy of this mtrand. | |
| unsigned long | next_long () |
| Get the next unsigned long value. | |
| double | next_dbl () |
| Get the next value in the range [0,1]. | |
| ~mtrand () | |
| Destructor. | |
The mtrand class is a random number generator based on a GNU implementation of the Mersenne Twister (see mtrand.cpp for more info). Each copy of the object has its own state, and so multiple copies will produce independent random number streams.
1.6.1