yat  0.12.3pre
Public Types | Public Member Functions | Protected Attributes | List of all members
theplu::yat::random::ContinuousUniform Class Reference

Uniform distribution. More...

#include <yat/random/random.h>

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

Public Types

typedef double result_type
 

Public Member Functions

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

RNGrng_
 pointer to GSL random generator
 

Detailed Description

Uniform distribution.

Class for generating a random number from a uniform distribution in the range [0,1), i.e. zero is included but not 1.

Distribution function $ f(x) = 1 $ for $ 0 \le x < 1 $
Expectation value: 0.5
Variance: $ \frac{1}{12} $

Member Typedef Documentation

type returned by operator()

Since
New in yat 0.10

Member Function Documentation

double theplu::yat::random::ContinuousUniform::operator() ( void  ) const
virtual
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 Jun 1 2015 12:29:52 for yat by  doxygen 1.8.5