theplu::yat::random::Poisson Class Reference

Poisson Distribution. More...

#include <yat/random/random.h>

Inheritance diagram for theplu::yat::random::Poisson:

theplu::yat::random::Discrete

List of all members.

Public Member Functions

 Poisson (const double m=1)
 Constructor.
unsigned long operator() (void) const
unsigned long operator() (const double m) 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_
 GSL random gererator.


Detailed Description

Poisson Distribution.

Having a Poisson process (i.e. no memory), number of occurences within a given time window is Poisson distributed. This distribution is the limit of a Binomial distribution when number of attempts is large, and the probability for one attempt to be succesful is small (in such a way that the expected number of succesful attempts is $ m $.

Probability function $ p(k) = e^{-m}\frac{m^k}{k!} $ for $ 0 \le k $
Expectation value: $ m $
Variance: $ m $


Constructor & Destructor Documentation

theplu::yat::random::Poisson::Poisson ( const double  m = 1  )  [explicit]

Constructor.

Parameters:
m is expectation value


Member Function Documentation

unsigned long theplu::yat::random::Poisson::operator() ( const double  m  )  const

Returns:
A Poisson distributed number with expectation value m
Note:
this operator ignores parameters set in Constructor

unsigned long theplu::yat::random::Poisson::operator() ( void   )  const [virtual]

Returns:
A Poisson distributed number.

Implements theplu::yat::random::Discrete.

void theplu::yat::random::Discrete::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).

See also:
seed_from_devurandom, RNG::seed_from_devurandom, RNG::seed

unsigned long theplu::yat::random::Discrete::seed_from_devurandom ( void   )  [inherited]

Set the seed using the /dev/urandom device.

Returns:
The seed acquired from /dev/urandom.
See also:
seed, RNG::seed_from_devurandom, RNG::seed


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

Generated on Mon Nov 7 02:25:52 2011 for yat by  doxygen 1.5.9