fGamma Function

private function fGamma(x, k, t)

@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$.

Arguments

Type IntentOptional AttributesName
real(kind=rp), intent(in) :: x
real(kind=rp), intent(in) :: k
real(kind=rp), intent(in) :: t

Return Value real(kind=rp)


Called by

proc~~fgamma~~CalledByGraph proc~fgamma fGamma proc~fre fRE proc~fre->proc~fgamma proc~sample_gamma_distribution sample_gamma_distribution proc~sample_gamma_distribution->proc~fre proc~get_gamma_distribution get_gamma_distribution proc~get_gamma_distribution->proc~sample_gamma_distribution

Contents

Source Code


Source Code

  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