Package org.jquantlib.math.distributions

Examples of org.jquantlib.math.distributions.GammaDistribution.op()


    double a = 1.0;
    final GammaDistribution gammDistribution = new GammaDistribution(a);
    for (final double[] testvalue : testvalues) {
      final double expected = testvalue[1];
      final double x = testvalue[0];
      final double computed = gammDistribution.op(x);
      // QL.info(computed); // for testing
      final double tolerance = 1.0e-15;
      if (Math.abs(expected-computed)>tolerance) {
        fail("x: " + x + " expected: " + expected + " realised: " + computed);
      }
View Full Code Here


    a = 0.1;
    final GammaDistribution gammDist = new GammaDistribution(a);
    for (final double[] element : testvalues2) {
      final double expected = element[1];
      final double x = element[0];
      final double computed = gammDist.op(x);
      // QL.info(computed); // for testing
      final double tolerance = 1.0e-15;
      if (Math.abs(expected-computed)>tolerance) {
        fail("x: " + x + " expected: " + expected + " realised: " + computed);
      }
View Full Code Here

      }

          public static double evaluateGammaDistribution(double a, double x) {
              GammaDistribution gd = new GammaDistribution(a);
              return gd.op(x);
          }
           public static double evaluateInverseCumulativeNormal(double average, double sigma, double x){
               InverseCumulativeNormal icn = new InverseCumulativeNormal(average,sigma);
               return icn.op(x);
           }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.