#include <adevs_rand.h>
Public Member Functions | |
| crand () | |
| Create a generator with the default seed. | |
| 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 () |
| Copy the random number generator. | |
| random_seq * | copy () const |
| Copy the random number generator. | |
| ~crand () | |
| Destructor. | |
The crand class provides random number sequences using the standard C rand() function. Since the underlying stream generator is rand(), the state of the random number generator can not be captured with a call to copy. Also, each instance of the object samples the same random number sequence.
1.6.1