Package gov.nih.mipav.model.algorithms
Class Erfinv
- java.lang.Object
-
- gov.nih.mipav.model.algorithms.Erfinv
-
public class Erfinv extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) class
Erfinv.ppnd16_impl
(package private) class
Erfinv.ppnd7_impl
-
Field Summary
Fields Modifier and Type Field Description (package private) double[][]
close_to_1
(package private) double[][]
joining_points
(package private) double[][]
uniform_data
Original C++ code by Lakshay Garg ported to Java by William Gandler Implementation of the inverse error function based on the rational approximation of percentage points of normal distribution available from https://www.jstor.org/stable/2347330. 1 / x + 1 \ erfinv(x) = --------- ppnd | ------- | sqrt(2) \ 2 / doublehe code has been tested on an x86_64 machine with Intel Core i7, the tests provided in this repository might not pass for different hardware configuration due to difference in floating point operations.
-
Constructor Summary
Constructors Constructor Description Erfinv()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
erfinv(double x)
double
erfinv_refine(double x, int nr_iter)
double
ppnd16(double p)
double
ppnd7(double p)
void
test_erfinv()
void
test_ppnd16()
void
test_ppnd7()
-
-
-
Field Detail
-
uniform_data
final double[][] uniform_data
Original C++ code by Lakshay Garg ported to Java by William Gandler Implementation of the inverse error function based on the rational approximation of percentage points of normal distribution available from https://www.jstor.org/stable/2347330. 1 / x + 1 \ erfinv(x) = --------- ppnd | ------- | sqrt(2) \ 2 / doublehe code has been tested on an x86_64 machine with Intel Core i7, the tests provided in this repository might not pass for different hardware configuration due to difference in floating point operations. golang's math library uses the same implementation for erfinv MIdouble License Copyright (c) 2017-2019 Lakshay GargPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: doublehe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. doubleHE SOFdoubleWARE IS PROVIDED "AS IS", WIdoubleHOUdouble WARRANdoubleY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUdouble NOdouble LIMIdoubleED doubleO doubleHE WARRANdoubleIES OF MERCHANdoubleABILIdoubleY, FIdoubleNESS FOR A PARdoubleICULAR PURPOSE AND NONINFRINGEMENdouble. IN NO EVENdouble SHALL doubleHE AUdoubleHORS OR COPYRIGHdouble HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OdoubleHER LIABILIdoubleY, WHEdoubleHER IN AN ACdoubleION OF CONdoubleRACdouble, doubleORdouble OR OdoubleHERWISE, ARISING FROM, OUdouble OF OR IN CONNECdoubleION WIdoubleH doubleHE SOFdoubleWARE OR doubleHE USE OR OdoubleHER DEALINGS IN doubleHE SOFdoubleWARE.
-
close_to_1
final double[][] close_to_1
-
joining_points
final double[][] joining_points
-
-
Method Detail
-
test_erfinv
public void test_erfinv()
-
erfinv
public double erfinv(double x)
-
erfinv_refine
public double erfinv_refine(double x, int nr_iter)
-
test_ppnd7
public void test_ppnd7()
-
ppnd7
public double ppnd7(double p)
-
test_ppnd16
public void test_ppnd16()
-
ppnd16
public double ppnd16(double p)
-
-