n!
777879808182838485
@Override public double op(final int k)/* @Read-only */ { if (mu==0.0) if (k==0) return 1.0; else return 0.0; final Factorial fact = new Factorial(); final double logFactorial = fact.ln(k); return Math.exp(k*Math.log(mu) - logFactorial - mu); }
6162636465666768
// // public methods // private double calcSummand(final int index) { final Factorial fact = new Factorial(); return Math.exp(-lambda) * Math.pow(lambda, index) / fact.get(index); }
383940414243444546
*/ public class MathHelper { public static double getFactorial(int n){ Factorial f = new Factorial(); /*return*/ f.get(n); return n; }
4445464748495051
/*return*/ f.get(n); return n; } public static double getlNFactorial(int n){ Factorial f = new Factorial(); return f.ln(n); }