class adevs::mtrand

The mtrand class is a random number generator based on a GNU implementation of the Mersenne Twister (see mtrandcpp for more info).

Inheritance:


Public Methods

[more] mtrand(unsigned long seed = 1)
Create a generator with an unsigned long seed
[more] mtrand(const unsigned long* seed_array)
Create a generator with an arbitrary length seed
[more] mtrand(const mtrand& src)
Copy constructor performs a deep copy
[more]const mtrand& operator=(const mtrand& src)
Assignment operator does a deep copy
[more]void set_seed(unsigned long seed)
Set the seed
[more]random_seq* copy() const
Create a copy of this mtrand
[more]unsigned long next_long()
Get the next unsigned long value
[more]double next_dbl()
Get the next value in the range [0,1]
[more] ~mtrand()
Destructor


Inherited from random_seq:


Documentation

The mtrand class is a random number generator based on a GNU implementation of the Mersenne Twister (see mtrandcpp for more info). Each copy of the object has its own state, and so multiple copies will produce independent random number streams.
o mtrand(unsigned long seed = 1)
Create a generator with an unsigned long seed

o mtrand(const unsigned long* seed_array)
Create a generator with an arbitrary length seed

o mtrand(const mtrand& src)
Copy constructor performs a deep copy

oconst mtrand& operator=(const mtrand& src)
Assignment operator does a deep copy

ovoid set_seed(unsigned long seed)
Set the seed

orandom_seq* copy() const
Create a copy of this mtrand

ounsigned long next_long()
Get the next unsigned long value

odouble next_dbl()
Get the next value in the range [0,1]

o ~mtrand()
Destructor


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.