yat  0.10.4pre
Public Types | Public Member Functions | Protected Attributes
theplu::yat::random::ContinuousGeneral Class Reference

Generates numbers from a histogram in a continuous manner. More...

#include </scratch/bob/jari/tmp/pristine/yat-0.10.x/yat/random/random.h>

Inheritance diagram for theplu::yat::random::ContinuousGeneral:
theplu::yat::random::Continuous

List of all members.

Public Types

typedef double result_type

Public Member Functions

 ContinuousGeneral (const statistics::Histogram &hist)
 Constructor.
double operator() (void) const
void seed (unsigned long s) const
 Set the seed to s.
unsigned long seed_from_devurandom (void)
 Set the seed using the /dev/urandom device.

Protected Attributes

RNGrng_
 pointer to GSL random generator

Detailed Description

Generates numbers from a histogram in a continuous manner.


Member Typedef Documentation

type returned by operator()

Since:
New in yat 0.10

Constructor & Destructor Documentation

theplu::yat::random::ContinuousGeneral::ContinuousGeneral ( const statistics::Histogram hist)
explicit

Constructor.

Parameters:
histis a Histogram defining the probability distribution

Member Function Documentation

double theplu::yat::random::ContinuousGeneral::operator() ( void  ) const
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.

Returns:
A random number.

Implements theplu::yat::random::Continuous.

void theplu::yat::random::Continuous::seed ( unsigned long  s) const
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).

Deprecated:
Provided for backward compatibility with the 0.7 API. Use RNG::instance()->seed(s) instead.
unsigned long theplu::yat::random::Continuous::seed_from_devurandom ( void  )
inherited

Set the seed using the /dev/urandom device.

Returns:
The seed acquired from /dev/urandom.
Deprecated:
Provided for backward compatibility with the 0.7 API. Use RNG::instance()->seed_from_devurandom() instead.

The documentation for this class was generated from the following file:

Generated on Mon Nov 11 2013 09:41:45 for yat by  doxygen 1.8.1