@brief Function that calculates the value of the Gamma distribution @f$f_\Gamma(x,\kappa,\theta) = \frac{1}{\Gamma(\kappa) \theta^\kappa}x^{\kappa-1}\exp{\left(-x/\theta\right)}@f$.
@param x Variable @f$x@f$ of @f$f_\Gamma(x,\kappa,\theta)@f$. @param k Shape factor @f$\kappa@f$ of @f$f_\Gamma(x,\kappa,\theta)@f$. @param t Scale factor @f$\theta@f$ of @f$f_\Gamma(x,\kappa,\theta)@f$. @param fGamma Computed value of @f$f_\Gamma(x,\kappa,\theta)@f$.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rp), | intent(in) | :: | x | |||
real(kind=rp), | intent(in) | :: | k | |||
real(kind=rp), | intent(in) | :: | t |
FUNCTION fGamma(x,k,t)
REAL(rp), INTENT(IN) :: x
REAL(rp), INTENT(IN) :: k
REAL(rp), INTENT(IN) :: t
REAL(rp) :: fGamma
fGamma = x**(k - 1.0_rp)*EXP(-x/t)/(GAMMA(k)*t**k)
END FUNCTION fGamma