Package org.snpeff.probablility
Class NormalDistribution
- java.lang.Object
-
- org.snpeff.probablility.NormalDistribution
-
public class NormalDistribution extends java.lang.Object
Calculate Normal distribution (PDF & CDF) using more precision if required- Author:
- pcingola
-
-
Field Summary
Fields Modifier and Type Field Description static double
MAX_NORM_DOUBLE
-
Constructor Summary
Constructors Constructor Description NormalDistribution()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description 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.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 Detail
-
MAX_NORM_DOUBLE
public static final double MAX_NORM_DOUBLE
- See Also:
- Constant Field Values
-
-
Method Detail
-
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:
-
-