25 #ifndef BINOMIAL_RANDOMDEV_H
26 #define BINOMIAL_RANDOMDEV_H
100 void set_p_n (
double,
unsigned int);
102 void set_n (
unsigned int);
112 using RandomDev::operator();
134 std::vector<double_t>
f_;
145 return static_cast<double>(
ldev(rthrd));
void set_p_n(double, unsigned int)
set parameters for p and n p - success probability for single trial n - number of trials ...
Definition: binomial_randomdev.cpp:126
double p_
probability p of binomial distribution
Definition: binomial_randomdev.h:130
long m_
Definition: binomial_randomdev.h:132
virtual double operator()(void)
Operator delivering doubles.
Definition: randomdev.h:199
void PrecomputeTable(size_t)
compute the internal lookup table
Definition: binomial_randomdev.cpp:58
BinomialRandomDev(RngPtr, double p_s=0.5, unsigned int n_s=1)
Definition: binomial_randomdev.cpp:40
void init_()
check and initialize internal parameters
Definition: binomial_randomdev.cpp:153
void get_status(DictionaryDatum &) const
get distribution parameters from SLI dict
Definition: binomial_randomdev.cpp:215
double phi_
Definition: binomial_randomdev.h:131
void set_p(double)
set p
Definition: binomial_randomdev.cpp:137
std::vector< double_t > f_
precomputed table of f
Definition: binomial_randomdev.h:134
ExpRandomDev exp_dev_
source of exponential random numbers
Definition: binomial_randomdev.h:129
bool has_ldev() const
true if RDG implements ldev function
Definition: binomial_randomdev.h:116
Class PoissonRandomDev Create Poisson distributed random numbers.
Definition: poisson_randomdev.h:103
unsigned int n_tablemax_
current maximal n with precomputed values
Definition: binomial_randomdev.h:135
void set_n(unsigned int)
set n
Definition: binomial_randomdev.cpp:143
void set_status(const DictionaryDatum &)
set distribution parameters from SLI dict
Definition: binomial_randomdev.cpp:189
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
Class BinomialRNG.
Definition: binomial_randomdev.h:85
Class ExpRandomDev Create exponential random numbers.
Definition: exp_randomdev.h:52
PoissonRandomDev poisson_dev_
source of Poisson random numbers
Definition: binomial_randomdev.h:128
unsigned int n_
parameter n in binomial distribution
Definition: binomial_randomdev.h:133