![]() |
Object-oriented Scientific Computing Library: Version 0.910
|
Random number generator base. More...
#include <rnga.h>
Using virtual functions is not recommended for random number generators, as speed is often an important issue. In order to facilitate the use of templates for routines which require random number generators, all descendants ought to provides the following functions:
gsl_rng_uniform_pos()
, i.e. as used in the GSL Monte Carlo classes.Public Member Functions | |
void | clock_seed () |
Initialize the seed with a value taken from the computer clock. | |
unsigned long int | get_seed () |
Get the seed. | |
void | set_seed (unsigned long int s) |
Set the seed. | |
Protected Member Functions | |
rnga (const rnga &) | |
rnga & | operator= (const rnga &) |
Protected Attributes | |
unsigned long int | seed |
The seed. |
void rnga::clock_seed | ( | ) |
This is a naive seed generator which uses seed=time(0)
to generate a seed.
Reimplemented in gsl_rnga.
Documentation generated with Doxygen. Provided under the GNU Free Documentation License (see License Information).