net.finmath.functions.GammaDistribution Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of finmath-lib Show documentation
Show all versions of finmath-lib Show documentation
finmath lib is a Mathematical Finance Library in Java.
It provides algorithms and methodologies related to mathematical finance.
/*
* (c) Copyright Christian P. Fries, Germany. Contact: [email protected].
*
* Created on 29.06.2014
*/
package net.finmath.functions;
/**
* @author Christian Fries
* @version 1.0
*/
public class GammaDistribution {
private final org.apache.commons.math3.distribution.GammaDistribution gammaDistribution;
public GammaDistribution(final double shape, final double scale) {
super();
gammaDistribution = new org.apache.commons.math3.distribution.GammaDistribution(shape, scale);
}
/**
* Return the inverse cumulative distribution function at x.
*
* @param x Argument
* @return Inverse cumulative distribution function at x.
*/
public double inverseCumulativeDistribution(final double x) {
return gammaDistribution.inverseCumulativeProbability(x);
}
}