Relacs Numerics Library
0.9.8
|
#include <random.h>
Public Member Functions | |
RandomBase (void) | |
RandomBase (unsigned long seed) | |
virtual | ~RandomBase (void) |
virtual unsigned long | setSeed (unsigned long seed)=0 |
virtual unsigned long | integer (void)=0 |
virtual unsigned long | min (void) const =0 |
virtual unsigned long | max (void) const =0 |
unsigned long | operator() (unsigned long n) |
double | operator() (void) |
virtual double | uniform (void)=0 |
virtual double | gaussian (void)=0 |
virtual double | exponential (void) |
virtual double | gamma (int a) |
virtual string | name (void)=0 |
The base class for random number generators.
|
inline |
|
inline |
|
inlinevirtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
unsigned long operator() | ( | unsigned long | n | ) |
Returns an uniformly distributed integer random number between zero and n. The range includes 0 but excludes n. This operator conforms to the STL RandomNumberGenerator specification. This function is NOT virtual in order to speed up computation.
double operator() | ( | void | ) |
Returns an uniformly distributed random number between zero and one. The range includes 0.0 but excludes 1.0.
|
pure virtual |
|
pure virtual |
|
virtual |
Returns an exponential distributed random number with mean one.
Reimplemented in RandomGSL, Ran3, and RandomStd.
References relacs::log().
Referenced by EventData::poisson().
|
virtual |
Returns a gamma distributed random number p(x) dx = x^(a-1) exp(-x)/Gamma(a) dx.
Reimplemented in Ran3, and RandomStd.
References relacs::exp(), relacs::log(), and relacs::sqrt().
|
pure virtual |