Package org.snpeff.probablility
Class NormalDistribution
java.lang.Object
org.snpeff.probablility.NormalDistribution
Calculate Normal distribution (PDF & CDF) using more precision if required
- Author:
- pcingola
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.apfloat.Apfloat
cdf
(double x, double mu, double sigma) DESCRIPTION The main computation evaluates near-minimax approximations derived from those in "Rational Chebyshev approximations for the error function" by W.static org.apfloat.Apfloat
cdfApfloat
(double x, double y, double[] p, double[] q) CDF using apfloatstatic org.apfloat.Apfloat
pdf
(double x, double mu, double sigma) static org.apfloat.Apfloat
pdfApfloat
(double x, double mu, double sigma)
-
Field Details
-
MAX_NORM_DOUBLE
public static final double MAX_NORM_DOUBLE- See Also:
-
-
Constructor Details
-
NormalDistribution
public NormalDistribution()
-
-
Method Details
-
pdf
public static org.apfloat.Apfloat pdf(double x, double mu, double sigma) -
pdfApfloat
public static org.apfloat.Apfloat pdfApfloat(double x, double mu, double sigma) -
cdf
public static org.apfloat.Apfloat cdf(double x, double mu, double sigma) DESCRIPTION The main computation evaluates near-minimax approximations derived from those in "Rational Chebyshev approximations for the error function" by W. J. Cody, Math. Comp., 1969, 631-637. This transportable program uses rational functions that theoretically approximate the normal distribution function to at least 18 significant decimal digits. The accuracy achieved depends on the arithmetic system, the compiler, the intrinsic functions, and proper selection of the machine-dependent constants. REFERENCE Cody, W. D. (1993). ALGORITHM 715: SPECFUN - A Portable FORTRAN Package of Special Function Routines and Test Drivers". ACM Transactions on Mathematical Software. 19, 22-32. -
cdfApfloat
public static org.apfloat.Apfloat cdfApfloat(double x, double y, double[] p, double[] q) CDF using apfloat- Parameters:
x
-y
-p
-q
-- Returns:
-