41 Super(gen), N(N), m(m), n(n) {
assert(N > 0 && m >= 0 && m <= N && n > 0 && n <= N); }
HyperGeo_(RandomGen &gen, Int N, Int m, Int n)
Definition: HyperGeo.h:40
virtual Real variance() const
Calc variance.
Definition: HyperGeo.h:48
virtual Real cdfInv(Real P) const
Inverse of the CDF.
Definition: HyperGeo.cpp:101
HyperGeo_< Real > HyperGeo
Definition: HyperGeo.h:55
Random number generator interface.
Definition: Gen.h:11
virtual Real pdf(Real x) const
Probability Density Function.
Definition: HyperGeo.cpp:42
Int n
Definition: HyperGeo.h:52
Int N
Definition: HyperGeo.h:50
Class to evaluate Gamma and related functions.
Definition: Gamma.h:9
GammaFunc_< Real > GammaFunc
Definition: Gamma.h:100
HyperGeo_< Float > HyperGeo_f
Definition: HyperGeo.h:56
virtual Real cdf(Real x) const
Cumulative Distribution Function.
Definition: HyperGeo.cpp:56
#define assert(...)
Forwards to assert_#args. See assert_1(), assert_2().
Definition: Debug.h:24
Int m
Definition: HyperGeo.h:51
HyperGeo_< Double > HyperGeo_d
Definition: HyperGeo.h:57
virtual Real next() const
Get next randomly distributed variate. Requires a random generator (see ctor or setGen()) ...
Definition: HyperGeo.cpp:11
float Real
Real number type. See Real_ for real number operations and constants.
Definition: Real.h:21
Numeric type information, use numeral() to get instance safely from a static context.
Definition: Numeral.h:17
Generate a random integer variate from a hypergeometric distribution.
Definition: HyperGeo.h:31
Global Honeycomb namespace.
virtual Real mean() const
Calc mean.
Definition: HyperGeo.h:47
Base class for all random distributions.
Definition: Dist.h:15