Om  1.0.0
A universal framework for multimedia simulation
Public Member Functions | List of all members
om::math::PoissonDistribution< T > Class Template Reference

A class that generates a Poisson probability distribution. More...

#include <omPoissonDistribution.h>

Public Member Functions

 PoissonDistribution ()
 Create a poisson distribution with parameter lambda equal to 1. More...
 
 PoissonDistribution (const Random< double > &newRandom)
 Create a poisson distribution with parameter lambda equal to 1. More...
 
 PoissonDistribution (double newLambda)
 Create a poisson distribution with the specified parameter lambda. More...
 
 PoissonDistribution (double newLambda, const Random< double > &newRandom)
 Create a poisson distribution with the specified parameter lambda. More...
 
 PoissonDistribution (double n, double p)
 Create a poisson distribution which approximates a binomial distribution. More...
 
 PoissonDistribution (double n, double p, const Random< double > &newRandom)
 Create a poisson distribution which approximates a binomial distribution. More...
 
sample ()
 Generate a sample from the Poisson distribution. More...
 
double getLambda () const
 Get the lambda parameter of this Poisson distribution. More...
 
void setLambda (double newLambda)
 Set the lambda parameter of this Poisson distribution. More...
 
Random< double > & getRandom ()
 Get the random variable used to generate samples for this distribution. More...
 
const Random< double > & getRandom () const
 Get the random variable used to generate samples for this distribution. More...
 
void setRandom (const Random< double > &newRandom)
 Set the random variable used to generate samples for this distribution. More...
 

Detailed Description

template<typename T>
class om::math::PoissonDistribution< T >

A class that generates a Poisson probability distribution.

Constructor & Destructor Documentation

template<typename T >
om::math::PoissonDistribution< T >::PoissonDistribution ( )
inline

Create a poisson distribution with parameter lambda equal to 1.

template<typename T >
om::math::PoissonDistribution< T >::PoissonDistribution ( const Random< double > &  newRandom)
inline

Create a poisson distribution with parameter lambda equal to 1.

The created Poisson distribution will produce samples using the specified random variable.

template<typename T >
om::math::PoissonDistribution< T >::PoissonDistribution ( double  newLambda)
inline

Create a poisson distribution with the specified parameter lambda.

template<typename T >
om::math::PoissonDistribution< T >::PoissonDistribution ( double  newLambda,
const Random< double > &  newRandom 
)
inline

Create a poisson distribution with the specified parameter lambda.

The created Poisson distribution will produce samples using the specified random variable.

template<typename T >
om::math::PoissonDistribution< T >::PoissonDistribution ( double  n,
double  p 
)
inline

Create a poisson distribution which approximates a binomial distribution.

When the parameter n is large and p is small, the Poisson distribution created will approximate the behavior of a binomial distribution with the parameters n and p. This can approximate the number of successes in a series of n independent yes/no experiments where the probability of a success is p.

template<typename T >
om::math::PoissonDistribution< T >::PoissonDistribution ( double  n,
double  p,
const Random< double > &  newRandom 
)
inline

Create a poisson distribution which approximates a binomial distribution.

When the parameter n is large and p is small, the Poisson distribution created will approximate the behavior of a binomial distribution with the parameters n and p. This can approximate the number of successes in a series of n independent yes/no experiments where the probability of a success is p. The created Poisson distribution will produce samples using the specified random variable.

Member Function Documentation

template<typename T >
T om::math::PoissonDistribution< T >::sample ( )
inline

Generate a sample from the Poisson distribution.

template<typename T >
double om::math::PoissonDistribution< T >::getLambda ( ) const
inline

Get the lambda parameter of this Poisson distribution.

template<typename T >
void om::math::PoissonDistribution< T >::setLambda ( double  newLambda)
inline

Set the lambda parameter of this Poisson distribution.

template<typename T >
Random<double>& om::math::PoissonDistribution< T >::getRandom ( )
inline

Get the random variable used to generate samples for this distribution.

template<typename T >
const Random<double>& om::math::PoissonDistribution< T >::getRandom ( ) const
inline

Get the random variable used to generate samples for this distribution.

template<typename T >
void om::math::PoissonDistribution< T >::setRandom ( const Random< double > &  newRandom)
inline

Set the random variable used to generate samples for this distribution.


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