bpp-core3
3.0.0
|
A quick and dirty uniform random number generator. More...
#include <Bpp/Numeric/Random/Uniform01QD.h>
Public Member Functions | |
Uniform01QD (long seed) | |
Create a Random Number Generator. More... | |
virtual | ~Uniform01QD () |
Destroy the generator. More... | |
void | setSeed (long seed) |
Set the seed for a new set of random numbers. More... | |
double | drawNumber () const |
Get a random number between 0.0 and 1.0 (exclusive of the end point values). More... | |
Private Attributes | |
long | seed_ |
A quick and dirty uniform random number generator.
This is a congruential uniform generator which draw double between 0 and 1 excluding the end points.
WARNING!!! Only works on 32bits architectures!
Definition at line 57 of file Uniform01QD.h.
|
inline |
Create a Random Number Generator.
seed | The seed for the random numbers. |
Definition at line 66 of file Uniform01QD.h.
|
inlinevirtual |
Destroy the generator.
Definition at line 71 of file Uniform01QD.h.
|
virtual |
Get a random number between 0.0 and 1.0 (exclusive of the end point values).
Implements bpp::RandomFactory.
Definition at line 50 of file Uniform01QD.cpp.
|
inlinevirtual |
Set the seed for a new set of random numbers.
Implements bpp::RandomFactory.
Definition at line 77 of file Uniform01QD.h.
References seed_.
|
mutableprivate |
Definition at line 85 of file Uniform01QD.h.
Referenced by setSeed().