Exemplo n.º 1
0
        internal override double LogFPrime(double mu, SGNFnAParam A)
        {
            double     z     = mu / A.S;
            LPhiObject lphio = WebExpoFunctions3.LPhi(z);

            return(-A.N * (mu - A.MuMean) / A.S2 - A.N * lphio.R[0] / A.S);
        }
Exemplo n.º 2
0
        internal override double LogFSecond(double mu, SGNFnAParam A)
        {
            double     z     = mu / A.S;
            LPhiObject lphio = WebExpoFunctions3.LPhi(z);

            return(A.N / A.S2 * (z * lphio.R[0] + lphio.R2[0] - 1));
        }
Exemplo n.º 3
0
        internal override double LogFSecond(double s, SGNFnAParam A)
        {
            double     z = A.Mu / s;
            LPhiObject l = WebExpoFunctions3.LPhi(z);

            return(A.N / Math.Pow(s, 2) - 6.0 * A.B / Math.Pow(s, 4) + A.N * z * ((Math.Pow(z, 2) - 2.0) * l.R[0] + z * l.R2[0]) / Math.Pow(s, 2));
        }
Exemplo n.º 4
0
        internal override double LogFPrime(double s, SGNFnAParam A)
        {
            double     z = A.Mu / s;
            LPhiObject l = WebExpoFunctions3.LPhi(z);

            return(-A.N / s + 2.0 * A.B / Math.Pow(s, 3) + A.N * z * l.R[0] / s);
        }
Exemplo n.º 5
0
        internal override double LogFPrime(double v, SGNFnAParam A)
        {
            LPhiObject l = WebExpoFunctions3.LPhi(1 / v);

            return
                (-A.N / v
                 + 2.0 * A.B / Math.Pow(v, 3)
                 + A.N * l.R[0] / Math.Pow(v, 2));
        }
Exemplo n.º 6
0
        internal override double LogFSecond(double s, SGNFnAParam A)
        {
            //    log.f.prime <- function(s, A){z <- exp(s)/A$ksi; l <- lphi(z); -l$r*z + A$y*z/A$ksi - z^2 - (s-A$mu)/A$sigma2}
            double[]   z     = new double[] { Math.Exp(s) / A.Ksi };
            LPhiObject lphio = WebExpoFunctions3.LPhi(z);
            double     r0    = lphio.R[0];
            double     z0    = z[0];

            return(r0 * (Math.Pow(z0, 3) - z[0]) + Math.Pow(r0 * z0, 2) + (A.Y * Math.Exp(s) - 2.0 * Math.Exp(2 * s)) / A.Ksi2 - 1.0 / A.Sigma2);
        }
Exemplo n.º 7
0
        internal override double LogFSecond(double v, SGNFnAParam A)
        {
            LPhiObject l  = WebExpoFunctions3.LPhi(1 / v);
            double     v2 = Math.Pow(v, 2);
            double     v4 = Math.Pow(v2, 2);

            return
                (A.N / v2
                 - 6.0 * A.B / v4
                 + A.N / v4 * (l.R[0] * (1 / v - 2.0 * v) + l.R2[0]));
        }
Exemplo n.º 8
0
        internal override double LogFPrime(double s, SGNFnAParam A)
        {
            double     z = A.Mu / s;
            LPhiObject l = WebExpoFunctions3.LPhi(z);

            return
                (-(A.N + 1.0) / s
                 + 2.0 * A.B / Math.Pow(s, 3)
                 - (Math.Log(s) - A.LM) / A.LS2 / s
                 + A.N * z * l.R[0] / s);
        }
Exemplo n.º 9
0
        internal override double LogFPrime(double s, SGNFnAParam A)
        {
            //    log.f.prime <- function(s, A){z <- exp(s)/A$ksi; l <- lphi(z); -l$r*z + A$y*z/A$ksi - z^2 - (s-A$mu)/A$sigma2}
            double     z     = Math.Exp(s) / A.Ksi;
            LPhiObject lphio = WebExpoFunctions3.LPhi(z);

            return
                (-lphio.R[0] * z
                 + A.Y * z / A.Ksi
                 - Math.Pow(z, 2) - (s - A.Mu) / A.Sigma2);
        }