10 template<
class Real>
class GammaInc;
36 typedef GammaInc<Double> GammaInc;
67 typedef typename Real_::DoubleType
Double_;
89 static Real gValue() {
return 10.0; }
96 static const int factorialTableSize;
97 static const Double factorialTable[];
Double_::Real Double
double type
Definition: Double.h:60
Algebra.
Definition: Alge.h:13
Gamma_< Real > Gamma
Definition: Gamma.h:54
static Real choose(Real n, Real m)
Number of ways of choosing m objects from n distinct objects. "N choose M". Both N and M can be fract...
Definition: Gamma.h:83
Real a
Definition: Gamma.h:50
static optnull_t optnull
Null optional, use to reset an optional to an uninitialized state or test for initialization.
Definition: Optional.h:12
Defines 64-bit floating point operations and constants.
Definition: Double.h:10
Generate a random variate from a gamma distribution .
Definition: Gamma.h:29
GammaFunc_< Double > GammaFunc_d
Definition: Gamma.h:102
Gamma_(Real a, Real b)
Definition: Gamma.h:40
Gamma_< Double > Gamma_d
Definition: Gamma.h:56
Class to evaluate Gamma and related functions.
Definition: Gamma.h:9
static Real exp(Real x)
Euler's number e raised to exponent x (e^x)
Definition: Alge.h:68
Real b
Definition: Gamma.h:51
GammaFunc_< Real > GammaFunc
Definition: Gamma.h:100
Alge_< Real > Alge
Definition: Alge.h:130
virtual Real cdfComp(Real x) const
Complement of the CDF.
Definition: Gamma.cpp:752
static Real gamma(Real z)
Gamma function.
Definition: Gamma.h:72
Gamma_(optional< RandomGen & > gen, Real a, Real b)
Definition: Gamma.h:39
virtual Real cdfInv(Real P) const
Inverse of the CDF.
Definition: Gamma.cpp:758
virtual Real variance() const
Calc variance.
Definition: Gamma.h:48
#define assert(...)
Forwards to assert_#args. See assert_1(), assert_2().
Definition: Debug.h:24
virtual Real cdf(Real x) const
Cumulative Distribution Function.
Definition: Gamma.cpp:746
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
Enables any type to be optional so it can exist in an uninitialized null state.
Definition: Optional.h:52
Gamma_< Float > Gamma_f
Definition: Gamma.h:55
double Real
Definition: Real.h:14
Numeral< Real >::Real_ Real_
Operations and constants for Real type. See Float_, Double_.
Definition: Real.h:25
static Num sqr(Num x)
Square.
Definition: Alge.h:60
virtual Real next() const
Get next randomly distributed variate. Requires a random generator (see ctor or setGen()) ...
Definition: Gamma.cpp:11
virtual Real pdf(Real x) const
Probability Density Function.
Definition: Gamma.cpp:48
virtual Real mean() const
Calc mean.
Definition: Gamma.h:47
Generate a normally (Gaussian) distributed random variate.
Definition: Gaussian.h:26
Global Honeycomb namespace.
GammaFunc_< Float > GammaFunc_f
Definition: Gamma.h:101
Trigonometry.
Definition: Trig.h:52
Base class for all random distributions.
Definition: Dist.h:15