Пример #1
0
        public static double CDFMethodAlphaOne(double x, double beta, double abe, ref object tempStorage, double precision)
        {
            if (0 == beta)
            {
                return(0.5 + Math.Atan(x) / Math.PI);
            }
            else
            {
                var inc = new Aeq1I(x, beta, abe);

                if (beta > 0)
                {
                    return(inc.CDFIntegrate(ref tempStorage, precision) / Math.PI);
                }
                else
                {
                    return(1 - inc.CDFIntegrate(ref tempStorage, precision) / Math.PI);
                }
            }
        }
Пример #2
0
 public static double PDFMethodAlphaOne(double x, double beta, double abe, ref object tempStorage, double precision)
 {
     if (0 == beta)
     {
         return(1 / (Math.PI * (1 + x * x)));
     }
     else
     {
         var inc = new Aeq1I(x, beta, abe);
         if (inc.IsMaximumLeftHandSide())
         {
             return(inc.Integrate(ref tempStorage, precision));
         }
         else
         {
             var dec = new Aeq1D(x, beta, abe);
             return(dec.Integrate(ref tempStorage, precision));
         }
     }
 }
Пример #3
0
		public static double CDFMethodAlphaOne(double x, double beta, double abe, ref object tempStorage, double precision)
		{
			if (0 == beta)
			{
				return 0.5 + Math.Atan(x) / Math.PI;
			}
			else
			{
				Aeq1I inc = new Aeq1I(x, beta, abe);

				if (beta > 0)
					return inc.CDFIntegrate(ref tempStorage, precision) / Math.PI;
				else
					return 1 - inc.CDFIntegrate(ref tempStorage, precision) / Math.PI;
			}
		}
Пример #4
0
		public static double PDFMethodAlphaOne(double x, double beta, double abe, ref object tempStorage, double precision)
		{
			if (0 == beta)
			{
				return 1 / (Math.PI * (1 + x * x));
			}
			else
			{
				Aeq1I inc = new Aeq1I(x, beta, abe);
				if (inc.IsMaximumLeftHandSide())
				{
					return inc.Integrate(ref tempStorage, precision);
				}
				else
				{
					Aeq1D dec = new Aeq1D(x, beta, abe);
					return dec.Integrate(ref tempStorage, precision);
				}
			}
		}