shark::Poisson< RngType > Class Template Reference

Implements a Poisson distribution with parameter mean. More...

#include <shark/Rng/Poisson.h>

+ Inheritance diagram for shark::Poisson< RngType >:

Public Member Functions

 Poisson (RngType &rng, double mean=0.01)
 C'tor taking parameter mean as argument. Associates the distribution with supplied RNG. More...
 
double operator() (double mean)
 Adjusts the parameter mean and samples the distribution. More...
 
double mean () const
 Accesses the parameter mean. More...
 
void mean (double newMean)
 Adjusts the parameter mean. More...
 
double p (double x) const
 Calculates the probability of x >= 0. More...
 

Detailed Description

template<typename RngType = shark::DefaultRngType>
class shark::Poisson< RngType >

Implements a Poisson distribution with parameter mean.

Definition at line 46 of file Poisson.h.

Constructor & Destructor Documentation

§ Poisson()

template<typename RngType = shark::DefaultRngType>
shark::Poisson< RngType >::Poisson ( RngType &  rng,
double  mean = 0.01 
)
inline

C'tor taking parameter mean as argument. Associates the distribution with supplied RNG.

Definition at line 57 of file Poisson.h.

Member Function Documentation

§ mean() [1/2]

template<typename RngType = shark::DefaultRngType>
double shark::Poisson< RngType >::mean ( ) const
inline

Accesses the parameter mean.

Definition at line 79 of file Poisson.h.

Referenced by shark::Poisson< RngType >::p().

§ mean() [2/2]

template<typename RngType = shark::DefaultRngType>
void shark::Poisson< RngType >::mean ( double  newMean)
inline

Adjusts the parameter mean.

Definition at line 87 of file Poisson.h.

§ operator()()

template<typename RngType = shark::DefaultRngType>
double shark::Poisson< RngType >::operator() ( double  mean)
inline

Adjusts the parameter mean and samples the distribution.

Parameters
[in]meanThe new mean.

Definition at line 70 of file Poisson.h.

§ p()

template<typename RngType = shark::DefaultRngType>
double shark::Poisson< RngType >::p ( double  x) const
inline

Calculates the probability of x >= 0.

Definition at line 95 of file Poisson.h.

References shark::Poisson< RngType >::mean().


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