public static double pdf(double x,double shape,double scale,double factor){
  if (x <= 0)   return 0.0;
  final double a=Math.exp(shape * Math.log(scale) - (shape + 1) * Math.log(x) - (scale / x) - GammaFunction.lnGamma(shape));
  return factor * a;
}

public static double pdf ( double x , double shape , double scale , double factor ) { if ( x <= 0 ) return 0.0 ; final double a = Math . exp ( shape * Math . log ( scale ) - ( shape + 1 ) * Math . log ( x ) - ( scale / x ) - GammaFunction . lnGamma ( shape ) ) ; return factor * a ; }
probability density function of the gamma distribution
