23 #ifndef POISSON_RANDOMDEV_H
24 #define POISSON_RANDOMDEV_H
132 using RandomDev::operator();
161 std::vector<double>
P_;
165 static const double a_[];
169 void proc_f_(
const unsigned k,
double &px,
double &py,
170 double &fx,
double &fy)
const;
179 return static_cast<double>(
ldev(rthrd));
static const unsigned n_a_
length of array
Definition: poisson_randomdev.h:166
virtual double operator()(void)
Operator delivering doubles.
Definition: randomdev.h:199
double c1_
Definition: poisson_randomdev.h:156
double c3_
Definition: poisson_randomdev.h:158
void set_lambda(double)
Definition: poisson_randomdev.cpp:76
double c2_
Definition: poisson_randomdev.h:157
double om_
Definition: poisson_randomdev.h:154
std::vector< double > P_
PoissonCDF.
Definition: poisson_randomdev.h:161
void set_status(const DictionaryDatum &)
set distribution parameters from SLI dict
Definition: poisson_randomdev.cpp:82
void proc_f_(const unsigned k, double &px, double &py, double &fx, double &fy) const
Procedure F from Ahrens & Dieter.
Definition: poisson_randomdev.cpp:299
static const unsigned fact_[]
array of factorials 0! .. 10!
Definition: poisson_randomdev.h:163
double mu_
Poisson parameter, aka lambda.
Definition: poisson_randomdev.h:143
Class PoissonRandomDev Create Poisson distributed random numbers.
Definition: poisson_randomdev.h:103
double s_
sqrt(mu_)
Definition: poisson_randomdev.h:146
static const double a_[]
array of a_i coeffs
Definition: poisson_randomdev.h:165
PoissonRandomDev(RngPtr, double lambda=0.0)
Definition: poisson_randomdev.cpp:63
RngPtr r
Definition: poisson_randomdev.h:105
bool has_ldev() const
true if RDG implements ldev function
Definition: poisson_randomdev.h:136
Abstract base class for access to non-uniform random deviate generators.
Definition: randomdev.h:131
virtual long ldev(void)
integer valued functions for discrete distributions
Definition: randomdev.h:206
void get_status(DictionaryDatum &) const
get distribution parameters from SLI dict
Definition: poisson_randomdev.cpp:115
unsigned long L_
floor(mu-1.1484)
Definition: poisson_randomdev.h:148
static const unsigned n_tab_
tabulate P_0 ... P_{n_tab_-1}
Definition: poisson_randomdev.h:160
double c0_
Definition: poisson_randomdev.h:155
double c_
0.1069 / mu_
Definition: poisson_randomdev.h:151
double d_
6 mu_^2
Definition: poisson_randomdev.h:147
void init_()
re-compute internal parameters
Definition: poisson_randomdev.cpp:120