Example usage for org.apache.commons.math3.distribution FDistribution FDistribution

List of usage examples for org.apache.commons.math3.distribution FDistribution FDistribution

Introduction

In this page you can find the example usage for org.apache.commons.math3.distribution FDistribution FDistribution.

Prototype

public FDistribution(double numeratorDegreesOfFreedom, double denominatorDegreesOfFreedom,
        double inverseCumAccuracy) throws NotStrictlyPositiveException 

Source Link

Document

Creates an F distribution using the given degrees of freedom and inverse cumulative probability accuracy.

Usage

From source file:adams.data.distribution.F.java

/**
 * Returns the configured distribution./*from w  w  w.  j a va  2s.  co  m*/
 *
 * @return      the distribution
 */
@Override
public RealDistribution getRealDistribution() {
    return new FDistribution(m_NumeratorDegreesOfFreedom, m_DenominatorDegreesOfFreedom, m_InverseCumAccuracy);
}

From source file:io.coala.random.impl.RandomDistributionFactoryImpl.java

@Override
public RandomNumberDistribution<Double> getF(final RandomNumberStream rng,
        final Number numeratorDegreesOfFreedom, final Number denominatorDegreesOfFreedom) {
    final RealDistribution dist = new FDistribution(RandomNumberStream.Util.asCommonsRandomGenerator(rng),
            numeratorDegreesOfFreedom.doubleValue(), denominatorDegreesOfFreedom.doubleValue());
    return new RandomNumberDistribution<Double>() {
        @Override/*from ww w.j a  v  a  2 s . c  o  m*/
        public Double draw() {
            return dist.sample();
        }
    };
}