PoissonDistribution.h
Go to the documentation of this file.
1 #ifndef _utl_PoissonDistribution_h_
2 #define _utl_PoissonDistribution_h_
3 
4 
5 #include <utl/Math.h>
6 
7 
8 namespace utl {
9 
10  typedef unsigned long ulong;
11 
12  inline double LogPoissonPDF(const ulong k, const double x)
13  { return -x - LogGamma(k+1) + k * log(x); }
14 
15  inline double PoissonPDF(const ulong k, const double x)
16  { return exp(LogPoissonPDF(k,x)); }
17 
18 }
19 
20 
21 #endif
double LogGamma(const double x)
unsigned long ulong
double LogPoissonPDF(const ulong k, const double x)
double PoissonPDF(const ulong k, const double x)

, generated on Tue Sep 26 2023.