Gaussian_< Real > Gaussian
Definition: Gaussian.h:56
Gaussian_< Float > Gaussian_f
Definition: Gaussian.h:57
static optnull_t optnull
Null optional, use to reset an optional to an uninitialized state or test for initialization.
Definition: Optional.h:12
virtual Real next() const
Get next randomly distributed variate. Requires a random generator (see ctor or setGen()) ...
Definition: Gaussian.cpp:12
virtual Real cdf(Real x) const
Cumulative Distribution Function.
Definition: Gaussian.cpp:40
virtual Real pdf(Real x) const
Probability Density Function.
Definition: Gaussian.cpp:32
Gaussian_(optional< RandomGen & > gen, Real mu=0, Real sigma=1)
Definition: Gaussian.h:33
static const double sqrtTwo
Definition: Double.h:42
static Real erfComp(Real x)
Complement of Error Function.
Definition: Gaussian.h:46
Real sigma
Definition: Gaussian.h:53
virtual Real variance() const
Calc variance.
Definition: Gaussian.h:41
static Real erfCompInv(Real y)
Inverse of complement Error Function.
Definition: Gaussian.h:50
Double_::Real Double
Definition: Dist.h:20
#define assert(...)
Forwards to assert_#args. See assert_1(), assert_2().
Definition: Debug.h:24
virtual Real cdfInv(Real P) const
Inverse of the CDF.
Definition: Gaussian.cpp:259
static Real erf(Real x)
Gauss Error Function, related to Cdf. Input: [-inf, inf] -> Output: [-1, 1].
Definition: Gaussian.h:44
float Real
Real number type. See Real_ for real number operations and constants.
Definition: Real.h:21
Enables any type to be optional so it can exist in an uninitialized null state.
Definition: Optional.h:52
Gaussian_< Double > Gaussian_d
Definition: Gaussian.h:58
static Num sqr(Num x)
Square.
Definition: Alge.h:60
Real mu
Definition: Gaussian.h:52
Gaussian_(Real mu=0, Real sigma=1)
Definition: Gaussian.h:34
Generate a normally (Gaussian) distributed random variate.
Definition: Gaussian.h:26
static Real erfInv(Real y)
Inverse of Error Function, related to CdfInv. Input: [-1, 1] -> Output: [-inf, inf].
Definition: Gaussian.h:48
Global Honeycomb namespace.
virtual Real mean() const
Calc mean.
Definition: Gaussian.h:40
Trigonometry.
Definition: Trig.h:52
Base class for all random distributions.
Definition: Dist.h:15