/** * Generates a random value from the {@link ChiSquaredDistribution ChiSquare Distribution}. * * @param df the degrees of freedom of the ChiSquare distribution * @return random value sampled from the ChiSquare(df) distribution */ public double nextChiSquare(double df) { return new ChiSquaredDistribution(getRandomGenerator(), df, ChiSquaredDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY).sample(); }
/** * @param df The degrees of freedom. * @return Ibid. */ public double nextChiSquare(double df) { return new ChiSquaredDistribution(randomGenerator, df).sample(); }
/** * Generates a random value from the {@link ChiSquaredDistribution ChiSquare Distribution}. * * @param df the degrees of freedom of the ChiSquare distribution * @return random value sampled from the ChiSquare(df) distribution */ public double nextChiSquare(double df) { return new ChiSquaredDistribution(getRandomGenerator(), df, ChiSquaredDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY).sample(); }
/** * Generates a random value from the {@link ChiSquaredDistribution ChiSquare Distribution}. * * @param df the degrees of freedom of the ChiSquare distribution * @return random value sampled from the ChiSquare(df) distribution */ public double nextChiSquare(double df) { return new ChiSquaredDistribution(getRandomGenerator(), df, ChiSquaredDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY).sample(); }
public double evaluate(Context context) { RandomGenerator randomGenerator = RandomUtil.getInstance().getRandomGenerator(); double e1 = getExpressions().get(0).evaluate(context); final ChiSquaredDistribution distribution = new ChiSquaredDistribution(randomGenerator, e1); return distribution.sample(); }