PoissonRandomNumberGenerator< T > Class Template Reference
Defines a random number generator with a Poisson distribution. More...
#include "util/random_number_generator.h"
Inheritance diagram for PoissonRandomNumberGenerator< T >:
Collaboration diagram for PoissonRandomNumberGenerator< T >:
Public Member Functions | |
PoissonRandomNumberGenerator (int seed, double mean) | |
virtual double | rand () |
Returns a random number. | |
double | prob (int n) |
Returns probability (just for check) | |
Private Member Functions | |
double | gammln (double xx) |
double | factrl (int n) |
Private Attributes | |
T | _rng |
double | _mean |
double | _sq |
double | _alxm |
double | _g |
Detailed Description
template<class T>
class Themis::PoissonRandomNumberGenerator< T >
Takes a unit variat random number generator class as a template argument. Uses the rejection method (a la NR).
Constructor & Destructor Documentation
PoissonRandomNumberGenerator | ( | int | seed, |
double | mean | ||
) |
Constructor for Gassian random number generator, takes an integer seed that specifies the full random sequence and a mean for the Poisson distribution.
The documentation for this class was generated from the following file: