Package org.apache.commons.math.distribution

Examples of org.apache.commons.math.distribution.GammaDistributionImpl


    return F.qnf(p, df1, df2, ncp, lowerTail, logP);
  }

  @DataParallel @Internal
  public static double dgamma(@Recycle double x, @Recycle double shape, @Recycle double scale, boolean log) {
    return d(new GammaDistributionImpl(shape, scale), x, log);
  }
View Full Code Here


    return d(new GammaDistributionImpl(shape, scale), x, log);
  }

  @DataParallel @Internal
  public static double pgamma(@Recycle double q, @Recycle double shape, @Recycle double scale, boolean lowerTail, boolean logP) {
    return p(new GammaDistributionImpl(shape, scale), q, lowerTail, logP);
  }
View Full Code Here

    return p(new GammaDistributionImpl(shape, scale), q, lowerTail, logP);
  }

  @DataParallel @Internal
  public static double qgamma(@Recycle double p, @Recycle double shape, @Recycle double scale, boolean lowerTail, boolean logP) {
    return q(new GammaDistributionImpl(shape, scale), p, lowerTail, logP);
  }
View Full Code Here

     * @return random value sampled from the Gamma(shape, scale) distribution
     * @throws MathException if an error occurs generating the random value
     * @since 2.2
     */
    public double nextGamma(double shape, double scale) throws MathException {
        return nextInversionDeviate(new GammaDistributionImpl(shape, scale));
    }
View Full Code Here

        }
        TestUtils.assertChiSquareAccept(expected, counts, 0.001);
    }
   
    public void testNextGamma() throws Exception {
        double[] quartiles = TestUtils.getDistributionQuartiles(new GammaDistributionImpl(4, 2));
        long[] counts = new long[4];
        randomData.reSeed(1000);
        for (int i = 0; i < 1000; i++) {
            double value = randomData.nextGamma(4, 2);
            TestUtils.updateCounts(value, counts, quartiles);
View Full Code Here

    this.q = new QFunction(new NFunction(alpha1, beta1),
        new NFunction(alpha2, beta2), p);
  }
 
  public double eval(int n, double e) {
    GammaDistribution g1 = new GammaDistributionImpl(alpha1 + n, beta1 + e);
    GammaDistribution g2 = new GammaDistributionImpl(alpha2 + n, beta2 + e);
    PiFunction pi = new PiFunction(q.eval(n, e), g1, g2);
    PiFunctionIntegral ipi = new PiFunctionIntegral(pi, target);
   
   
   
View Full Code Here

TOP

Related Classes of org.apache.commons.math.distribution.GammaDistributionImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.