Class CDFLIB


  • public class CDFLIB
    extends java.lang.Object
    Legalities ========== We place our efforts in writing this package in the public domain. However, code from ACM publications is subject to the ACM policy (below). References ========== Incomplete Beta --------------- DiDinato, A. R. and Morris, A. H. (1993) ``Algorithm 708: Significant Digit Computation of the Incomplete Beta Function Ratios.'' ACM Trans. Math. Softw. 18, 360-373. Incomplete Gamma ---------------- DiDinato, A. R. and Morris, A. H. (1986) ``Computation of the incomplete gamma function ratios and their inverse.'' ACM Trans. Math. Softw. 12, 377-393. Cumulative Normal ----------------- Cody, W.D. (1993). ``ALGORITHM 715: SPECFUN - A Portable FORTRAN Package of Special Function Routines and Test Drivers'' ACM Trans. Math. Softw. 19, 22-32. Inverse Normal -------------- ``Algorithm AS241'' (1988) Appl. Statist. 37, NO. 3, 477-484. Finding a Zero of a Monotone Function ------------------------------------- Alefeld, G. E., Potra, F. A., Shi, Y. (1995) ``Algorithm 748: Enclosing Zeros of Continuous Functions.'', by G. E. Alefeld, F. A. Potra, YiXun Shi, ACM Trans. Math. Softw., 21, No. 3, 327-344 ACM Policy on Use of Code ========================= Here is the software Policy of the ACM. Submittal of an algorithm for publication in one of the ACM Transactions implies that unrestricted use of the algorithm within a computer is permissible. General permission to copy and distribute the algorithm without fee is granted provided that the copies are not made or distributed for direct commercial advantage. The ACM copyright notice and the title of the publication and its date appear, and notice is given that copying is by permission of the Association for Computing Machinery. To copy otherwise, or to republish, requires a fee and/or specific permission. Krogh, F. (1997) ``Algorithms Policy.'' ACM Tran. Math. Softw. 13, 183-186. We do not know the policy of the Royal Statistical Society; they have discontinued publishing algorithms. However, they made a number of these programs available on Statlib on condition that there be no charge for their distribution. Here is our standard disclaimer. NO WARRANTY WE PROVIDE ABSOLUTELY NO WARRANTY OF ANY KIND EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THIS PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.IN NO EVENT SHALL THE UNIVERSITY OF TEXAS OR ANY OF ITS COMPONENT INSTITUTIONS INCLUDING M. D. ANDERSON HOSPITAL BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY LOST PROFITS, LOST MONIES, OR OTHER SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA OR ITS ANALYSIS BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY THIRD PARTIES) THE PROGRAM.
    • Constructor Summary

      Constructors 
      Constructor Description
      CDFLIB()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private double algdiv​(double a, double b)  
      private double alnrel​(double a)  
      private double apser​(double a, double b, double x, double eps)  
      private double basym​(double a, double b, double lambda, double eps)  
      private double bcorr​(double a0, double b0)  
      private double betaln​(double a0, double b0)  
      private double bfrac​(double a, double b, double x, double y, double lambda, double eps)  
      private void bgrat​(double a, double b, double x, double y, double[] w, double eps, int[] ierr)  
      private double bpser​(double a, double b, double x, double eps)  
      private void bratio​(double a, double b, double x, double y, double[] w, double[] w1, int[] ierr)  
      private double brcmp1​(int mu, double a, double b, double x, double y)  
      private double brcomp​(double a, double b, double x, double y)  
      private double bup​(double a, double b, double x, double y, int n, double eps)  
      private void cdff​(int which, double[] p, double[] q, double[] f, double[] dfn, double[] dfd, int[] status, double[] bound)  
      private void cumf​(double f, double dfn, double dfd, double[] cum, double[] ccum)  
      private void dinvr​(int[] status, double[] x, double[] fx, boolean[] qleft, boolean[] qhi)  
      private void dstinv​(double zsmall, double zbig, double zabsst, double zrelst, double zstpmu, double zabsto, double zrelto)  
      private void dstzr​(double zxlo, double zxhi, double zabstl, double zreltl)  
      private void dzror​(int[] status, double[] x, double[] fx, double[] xlo, double[] xhi, boolean[] qleft, boolean[] qhi)  
      private double EPSILON()  
      private double erf​(double x)  
      double erfc1​(int ind, double x)  
      private double esum​(int mu, double x)  
      private double evaluate_polynomial​(double[] a, double x)  
      private double exparg​(int l)  
      private double fpser​(double a, double b, double x, double eps)  
      private double ftol​(double zx)  
      private double gam1​(double a)  
      private double gamln​(double a)  
      private double gamln1​(double a)  
      private void grat1​(double a, double x, double r, double[] p, double[] q, double eps)  
      private double gsumln​(double a, double b)  
      private int ipmpar​(int i)  
      private double psi​(double xx)  
      private boolean qxmon​(double zx, double zy, double zz)  
      private double rexp​(double x)  
      private double rlog1​(double x)  
      void selfTest()  
      private double spmpar​(int i)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • small

        private double small
      • big

        private double big
      • absstp

        private double absstp
      • relstp

        private double relstp
      • stpmul

        private double stpmul
      • abstol

        private double abstol
      • reltol

        private double reltol
      • xxlo

        private double xxlo
      • xxhi

        private double xxhi
      • i99999_dinvr

        private int i99999_dinvr
      • fbig_dinvr

        private double fbig_dinvr
      • fsmall_dinvr

        private double fsmall_dinvr
      • xsave_dinvr

        private double xsave_dinvr
      • yy_dinvr

        private double yy_dinvr
      • step_dinvr

        private double step_dinvr
      • xub_dinvr

        private double xub_dinvr
      • xlb_dinvr

        private double xlb_dinvr
      • xlo_dinvr

        private double[] xlo_dinvr
      • xhi_dinvr

        private double[] xhi_dinvr
      • qdum1_dinvr

        private boolean[] qdum1_dinvr
      • qdum2_dinvr

        private boolean[] qdum2_dinvr
      • qup_dinvr

        private boolean qup_dinvr
      • qincr_dinvr

        private boolean qincr_dinvr
      • qcond_dinvr

        private boolean qcond_dinvr
      • qlim_dinvr

        private boolean qlim_dinvr
      • qbdd_dinvr

        private boolean qbdd_dinvr
      • i99999_dzror

        private int i99999_dzror
      • fda_dzror

        private double fda_dzror
      • fdb_dzror

        private double fdb_dzror
      • m_dzror

        private double m_dzror
      • fb_dzror

        private double fb_dzror
      • a_dzror

        private double a_dzror
      • fa_dzror

        private double fa_dzror
      • b_dzror

        private double b_dzror
      • c_dzror

        private double c_dzror
      • fc_dzror

        private double fc_dzror
      • mb_dzror

        private double mb_dzror
      • tol_dzror

        private double tol_dzror
      • d_dzror

        private double d_dzror
      • fd_dzror

        private double fd_dzror
      • p_dzror

        private double p_dzror
      • q_dzror

        private double q_dzror
      • w_dzror

        private double w_dzror
      • ext_dzror

        private int ext_dzror
      • first_dzror

        private boolean first_dzror
      • qrzero_dzror

        private boolean qrzero_dzror
    • Constructor Detail

      • CDFLIB

        public CDFLIB()
    • Method Detail

      • selfTest

        public void selfTest()
      • cdff

        private void cdff​(int which,
                          double[] p,
                          double[] q,
                          double[] f,
                          double[] dfn,
                          double[] dfd,
                          int[] status,
                          double[] bound)
      • dstinv

        private void dstinv​(double zsmall,
                            double zbig,
                            double zabsst,
                            double zrelst,
                            double zstpmu,
                            double zabsto,
                            double zrelto)
      • dinvr

        private void dinvr​(int[] status,
                           double[] x,
                           double[] fx,
                           boolean[] qleft,
                           boolean[] qhi)
      • dstzr

        private void dstzr​(double zxlo,
                           double zxhi,
                           double zabstl,
                           double zreltl)
      • dzror

        private void dzror​(int[] status,
                           double[] x,
                           double[] fx,
                           double[] xlo,
                           double[] xhi,
                           boolean[] qleft,
                           boolean[] qhi)
      • ftol

        private double ftol​(double zx)
      • qxmon

        private boolean qxmon​(double zx,
                              double zy,
                              double zz)
      • cumf

        private void cumf​(double f,
                          double dfn,
                          double dfd,
                          double[] cum,
                          double[] ccum)
      • spmpar

        private double spmpar​(int i)
      • ipmpar

        private int ipmpar​(int i)
      • EPSILON

        private double EPSILON()
      • bratio

        private void bratio​(double a,
                            double b,
                            double x,
                            double y,
                            double[] w,
                            double[] w1,
                            int[] ierr)
      • basym

        private double basym​(double a,
                             double b,
                             double lambda,
                             double eps)
      • bgrat

        private void bgrat​(double a,
                           double b,
                           double x,
                           double y,
                           double[] w,
                           double eps,
                           int[] ierr)
      • grat1

        private void grat1​(double a,
                           double x,
                           double r,
                           double[] p,
                           double[] q,
                           double eps)
      • rexp

        private double rexp​(double x)
      • erf

        private double erf​(double x)
      • erfc1

        public double erfc1​(int ind,
                            double x)
      • bup

        private double bup​(double a,
                           double b,
                           double x,
                           double y,
                           int n,
                           double eps)
      • brcmp1

        private double brcmp1​(int mu,
                              double a,
                              double b,
                              double x,
                              double y)
      • esum

        private double esum​(int mu,
                            double x)
      • bfrac

        private double bfrac​(double a,
                             double b,
                             double x,
                             double y,
                             double lambda,
                             double eps)
      • brcomp

        private double brcomp​(double a,
                              double b,
                              double x,
                              double y)
      • rlog1

        private double rlog1​(double x)
      • fpser

        private double fpser​(double a,
                             double b,
                             double x,
                             double eps)
      • exparg

        private double exparg​(int l)
      • apser

        private double apser​(double a,
                             double b,
                             double x,
                             double eps)
      • psi

        private double psi​(double xx)
      • evaluate_polynomial

        private double evaluate_polynomial​(double[] a,
                                           double x)
      • bpser

        private double bpser​(double a,
                             double b,
                             double x,
                             double eps)
      • gam1

        private double gam1​(double a)
      • betaln

        private double betaln​(double a0,
                              double b0)
      • bcorr

        private double bcorr​(double a0,
                             double b0)
      • gsumln

        private double gsumln​(double a,
                              double b)
      • algdiv

        private double algdiv​(double a,
                              double b)
      • alnrel

        private double alnrel​(double a)
      • gamln

        private double gamln​(double a)
      • gamln1

        private double gamln1​(double a)