yat
0.20.3pre
|
Generates numbers from a histogram in a continuous manner. More...
#include <yat/random/random.h>
Public Types | |
typedef double | result_type |
Public Member Functions | |
ContinuousGeneral (const statistics::Histogram &hist) | |
Constructor. More... | |
double | operator() (void) const |
void | seed (unsigned long s) const |
Set the seed to s. More... | |
unsigned long | seed_from_devurandom (void) |
Set the seed using the /dev/urandom device. More... | |
Protected Attributes | |
RNG * | rng_ |
pointer to GSL random generator | |
Generates numbers from a histogram in a continuous manner.
|
inherited |
type returned by operator()
|
explicit |
Constructor.
hist | is a Histogram defining the probability distribution |
|
virtual |
The number is generated in a two step process. First the bin in the histogram is randomly selected (see DiscreteGeneral). Then a number is generated uniformly from the interval defined by the bin.
Implements theplu::yat::random::Continuous.
|
inherited |
Set the seed to s.
Set the seed to s in the underlying rng. If s is zero, a default value from the rng's original implementation is used (cf. GSL documentation).
|
inherited |
Set the seed using the /dev/urandom device.