public class InverseCdf extends Object implements Serializable
InverseCdf evaluates the inverse of a continuous,
strictly monotone function. Its most obvious use is in evaluating inverses
of continuous distribution functions that can be defined by a user-supplied
function, which implements the
The inverse is computed using regula falsi and/or
bisection, possibly with the Illinois modification (see Dahlquist and Bjorck
1974). A maximum of 100 iterations are performed.
|Modifier and Type||Class and Description|
The iteration did not converge
|Constructor and Description|
Constructor for the inverse of a user-supplied cummulative distribution function.
|Modifier and Type||Method and Description|
Evaluates the inverse CDF function.
Sets the tolerance to be used as the convergence criterion.
public InverseCdf(CdfFunction cdf)
cdf- is a
CdfFunctionobject that contains the user-supplied function to be inverted. The cdf function must be continuous and strictly monotone.
public double eval(double p, double guess) throws InverseCdf.DidNotConvergeException
doublescalar value representing the point at which the inverse CDF is desired
doublescalar value representing an initial estimate of the inverse at p
doublescalar value representing the inverse of the CDF at the point p. Cdf(inverseCdf) is "close" to p.
public void setTolerance(double tolerance)
doublescalar value representing the convergence criterion. When the relative change from one iteration to the next is less than tolerance, convergence is assumed. The default value for tolerance is 0.0001.
Copyright © 1970-2015 Rogue Wave Software
Built October 13 2015.