The crand class provides random number sequences using the standard
C rand() function.
Inheritance:
Public Methods
-
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
-
~crand()
- Destructor
Documentation
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.
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
~crand()
- Destructor
- This class has no child classes.
Alphabetic index HTML hierarchy of classes or Java
This page was generated with the help of DOC++.