12 #include "libmesh/utility.h" 23 "scale", 1.0,
"scale > 0",
"Scale parameter (theta or 1/beta).");
79 const unsigned int max_iter = 1e6;
84 for (
unsigned int i = 0; i < max_iter; ++i)
89 if (std::abs(cn / val) <
tol)
93 mooseAssert(
false,
"Could not compute incomplete gamma function.");
103 const unsigned int max_iter = 1e6;
106 for (
unsigned int i = 0; i < max_iter; ++i)
109 if (std::abs(
f) <
tol)
115 mooseAssert(
false,
"Could not find inverse of incomplete gamma function.");
Gamma(const InputParameters ¶meters)
static InputParameters validParams()
A class used to generate a Gamma distribution.
virtual Real cdf(const Real &x) const override
const Real & _alpha
Shape.
virtual Real pdf(const Real &x) const override
registerMooseObject("StochasticToolsApp", Gamma)
const std::vector< double > x
Real f(Real x)
Test function for Brents method.
const Real & _theta
Scaling.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual Real quantile(const Real &p) const override
static const std::string alpha
static InputParameters validParams()
static Real incompleteGammaInv(const Real &a, const Real &p)
Inverse of lower incomplete gamma function.
static Real incompleteGamma(const Real &a, const Real &x)
Lower incomplete gamma function.
MooseUnits pow(const MooseUnits &, int)