|
adevs
|
#include <adevs_rand.h>
Public Member Functions | |
| crand () | |
| Create a generator with the default seed. | |
| crand (const crand &src) | |
| Copy constructor. | |
| crand (unsigned long seed) | |
| Create a generator with the given seed. | |
| void | set_seed (unsigned long seed) |
| Set the seed for the random number generator. | |
| double | next_dbl () |
| Get the next double uniformly distributed in [0, 1]. | |
| unsigned long | next_long () |
| Get the next unsigned long. | |
| random_seq * | copy () const |
| Copy the random number generator. | |
| ~crand () | |
| Destructor. | |
Public Member Functions inherited from adevs::random_seq | |
| virtual | ~random_seq () |
| Destructor. | |
The crand class provides random number sequences using the standard C rand_r() function. Each instance of crand generates its own random number sequence, and the clone method saves the state of the random number generator. This class can be used in parallel simulations.
1.8.6