#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:
Definition at line 50 of file rnga.h.
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 clock_seed | ( | ) |
Initialize the seed with a value taken from the computer clock.
This is a naive seed generator which uses seed=time
(NULL) to generate a seed.
Documentation generated with Doxygen and provided under the GNU Free Documentation License. See License Information for details.
Project hosting provided by
,
O2scl Sourceforge Project Page