Example #1
0
 /// <summary>
 /// Modified Bessel function of the first kind, I(v, z).
 /// <p/>
 /// If expScaled is true, returns Exp(-Abs(x)) * I(v, z) where x = z.Real.
 /// </summary>
 /// <param name="v">The order of the Bessel function</param>
 /// <param name="z">The value to compute the Bessel function of.</param>
 /// <param name="expScaled">If true, returns exponentially-scaled Bessel function</param>
 /// <returns></returns>
 public static double BesselI(double v, double z, bool expScaled = false)
 {
     if (expScaled)
     {
         return(Amos.ScaledCbesi(v, z));
     }
     else
     {
         return(BesselI(v, new Complex(z, 0), expScaled).Real);
     }
 }
Example #2
0
 /// <summary>
 /// Derivative of the Airy function Ai.
 /// <p/>
 /// If expScaled is true, returns Exp(zta) * d/dz Ai(z), where zta = (2/3) * z * Sqrt(z).
 /// </summary>
 /// <param name="z">The value to compute the derivative of the Airy function of.</param>
 /// <param name="expScaled">If true, returns exponentially-scaled Airy function</param>
 /// <returns></returns>
 public static double AiryAiPrime(double z, bool expScaled = false)
 {
     if (expScaled)
     {
         return(Amos.ScaledCairyPrime(z));
     }
     else
     {
         return(AiryAiPrime(new Complex(z, 0), expScaled).Real);
     }
 }
Example #3
0
 /// <summary>
 /// Returns the exponentially scaled Airy function Ai.
 /// <para>ScaledAiryAi(z) is given by Exp(zta) * AiryAi(z), where zta = (2/3) * z * Sqrt(z).</para>
 /// </summary>
 /// <param name="z">The value to compute the Airy function of.</param>
 /// <returns>The exponentially scaled Airy function Ai.</returns>
 public static Complex AiryAiScaled(Complex z)
 {
     return(Amos.ScaledCairy(z));
 }
Example #4
0
 /// <summary>
 /// Returns the Airy function Ai.
 /// <para>AiryAi(z) is a solution to the Airy equation, y'' - y * z = 0.</para>
 /// </summary>
 /// <param name="z">The value to compute the Airy function of.</param>
 /// <returns>The Airy function Ai.</returns>
 public static Complex AiryAi(Complex z)
 {
     return(Amos.Cairy(z));
 }
Example #5
0
 /// <summary>
 /// Returns the Airy function Bi.
 /// <para>AiryBi(z) is a solution to the Airy equation, y'' - y * z = 0.</para>
 /// </summary>
 /// <param name="z">The value to compute the Airy function of.</param>
 /// <returns>The Airy function Bi.</returns>
 public static Complex AiryBi(Complex z)
 {
     return(Amos.Cbiry(z));
 }
Example #6
0
 /// <summary>
 /// Returns the Bessel function of the second kind.
 /// <para>BesselY(n, z) is a solution to the Bessel differential equation.</para>
 /// </summary>
 /// <param name="n">The order of the Bessel function.</param>
 /// <param name="z">The value to compute the Bessel function of.</param>
 /// <returns>The Bessel function of the second kind.</returns>
 public static Complex BesselY(double n, Complex z)
 {
     return(Amos.Cbesy(n, z));
 }
Example #7
0
 /// <summary>
 /// Returns the exponentially scaled Bessel function of the first kind.
 /// <para>ScaledBesselJ(n, z) is given by Exp(-Abs(z.Imaginary)) * BesselJ(n, z).</para>
 /// </summary>
 /// <param name="n">The order of the Bessel function.</param>
 /// <param name="z">The value to compute the Bessel function of.</param>
 /// <returns>The exponentially scaled Bessel function of the first kind.</returns>
 public static double BesselJScaled(double n, double z)
 {
     return(Amos.ScaledCbesj(n, z));
 }
Example #8
0
 /// <summary>
 /// Returns the exponentially scaled derivative of Airy function Ai
 /// <para>ScaledAiryAiPrime(z) is given by Exp(zta) * AiryAiPrime(z), where zta = (2/3) * z * Sqrt(z).</para>
 /// </summary>
 /// <param name="z">The value to compute the derivative of the Airy function of.</param>
 /// <returns>The exponentially scaled derivative of Airy function Ai.</returns>
 public static Complex AiryAiPrimeScaled(Complex z)
 {
     return(Amos.ScaledCairyPrime(z));
 }
Example #9
0
 /// <summary>
 /// Hankel function of the second kind, H2(n, z).
 /// <p/>
 /// If expScaled is true, returns Exp(z * j) * H2(n, z) where j = Sqrt(-1).
 /// </summary>
 /// <param name="n">The order of the Hankel function</param>
 /// <param name="z">The value to compute the Bessel function of.</param>
 /// <param name="expScaled">If true, returns exponentially-scaled Hankel function</param>
 /// <returns></returns>
 public static Complex HankelH2(double n, Complex z, bool expScaled = false)
 {
     return((expScaled) ? Amos.ScaledCbesh2(n, z) : Amos.Cbesh2(n, z));
 }
Example #10
0
 /// <summary>
 /// Returns the exponentially scaled Hankel function of the second kind.
 /// <para>ScaledHankelH2(n, z) is given by Exp(z * j) * HankelH2(n, z) where j = Sqrt(-1).</para>
 /// </summary>
 /// <param name="n">The order of the Hankel function.</param>
 /// <param name="z">The value to compute the Hankel function of.</param>
 /// <returns>The exponentially scaled Hankel function of the second kind.</returns>
 public static Complex HankelH2Scaled(double n, Complex z)
 {
     return(Amos.ScaledCbesh2(n, z));
 }
Example #11
0
 /// <summary>
 /// Returns the Hankel function of the second kind.
 /// <para>HankelH2(n, z) is defined as BesselJ(n, z) - j * BesselY(n, z).</para>
 /// </summary>
 /// <param name="n">The order of the Hankel function.</param>
 /// <param name="z">The value to compute the Hankel function of.</param>
 /// <returns>The Hankel function of the second kind.</returns>
 public static Complex HankelH2(double n, Complex z)
 {
     return(Amos.Cbesh2(n, z));
 }
Example #12
0
 /// <summary>
 /// Modified Bessel function of the first kind, I(v, z).
 /// <p/>
 /// If expScaled is true, returns Exp(-Abs(x)) * I(v, z) where x = z.Real.
 /// </summary>
 /// <param name="v">The order of the Bessel function</param>
 /// <param name="z">The value to compute the Bessel function of.</param>
 /// <param name="expScaled">If true, returns exponentially-scaled Bessel function</param>
 /// <returns></returns>
 public static Complex BesselI(double v, Complex z, bool expScaled = false)
 {
     return((expScaled) ? Amos.ScaledCbesi(v, z) : Amos.Cbesi(v, z));
 }
Example #13
0
 /// <summary>
 /// Bessel function of the second kind, Y(v, z).
 /// <p/>
 /// If expScaled is true, returns Exp(-Abs(y)) * Y(v, z) where y = z.Imaginary.
 /// </summary>
 /// <param name="v">The order of the Bessel function</param>
 /// <param name="z">The value to compute the Bessel function of.</param>
 /// <param name="expScaled">If true, returns exponentially-scaled Bessel function</param>
 /// <returns></returns>
 public static double BesselY(double v, double z, bool expScaled = false)
 {
     return((expScaled) ? Amos.ScaledCbesy(v, z) : Amos.Cbesy(v, z));
 }
Example #14
0
 /// <summary>
 /// Airy function Bi(z).
 /// <p/>
 /// If expScaled is true, returns Exp(-axzta) * Bi(z) where zta = (2 / 3) * z * Sqrt(z) and axzta = Abs(zta.Real).
 /// </summary>
 /// <param name="z">The value to compute the Airy function of.</param>
 /// <param name="expScaled">If true, returns exponentially-scaled Airy function</param>
 /// <returns></returns>
 public static Complex AiryBi(Complex z, bool expScaled = false)
 {
     return((expScaled) ? Amos.ScaledCbiry(z) : Amos.Cbiry(z));
 }
Example #15
0
 /// <summary>
 /// Returns the exponentially scaled Airy function Ai.
 /// <para>ScaledAiryAi(z) is given by Exp(zta) * AiryAi(z), where zta = (2/3) * z * Sqrt(z).</para>
 /// </summary>
 /// <param name="z">The value to compute the Airy function of.</param>
 /// <returns>The exponentially scaled Airy function Ai.</returns>
 public static double AiryAiScaled(double z)
 {
     return(Amos.ScaledCairy(z));
 }
Example #16
0
 /// <summary>
 /// Returns the exponentially scaled Bessel function of the first kind.
 /// <para>ScaledBesselJ(n, z) is given by Exp(-Abs(z.Imaginary)) * BesselJ(n, z).</para>
 /// </summary>
 /// <param name="n">The order of the Bessel function.</param>
 /// <param name="z">The value to compute the Bessel function of.</param>
 /// <returns>The exponentially scaled Bessel function of the first kind.</returns>
 public static Complex BesselJScaled(double n, Complex z)
 {
     return(Amos.ScaledCbesj(n, z));
 }
Example #17
0
 /// <summary>
 /// Returns the derivative of the Airy function Ai.
 /// <para>AiryAiPrime(z) is defined as d/dz AiryAi(z).</para>
 /// </summary>
 /// <param name="z">The value to compute the derivative of the Airy function of.</param>
 /// <returns>The derivative of the Airy function Ai.</returns>
 public static Complex AiryAiPrime(Complex z)
 {
     return(Amos.CairyPrime(z));
 }
Example #18
0
 /// <summary>
 /// Returns the Bessel function of the first kind.
 /// <para>BesselJ(n, z) is a solution to the Bessel differential equation.</para>
 /// </summary>
 /// <param name="n">The order of the Bessel function.</param>
 /// <param name="z">The value to compute the Bessel function of.</param>
 /// <returns>The Bessel function of the first kind.</returns>
 public static double BesselJ(double n, double z)
 {
     return(Amos.Cbesj(n, z));
 }
Example #19
0
 /// <summary>
 /// Returns the exponentially scaled derivative of the Airy function Ai.
 /// <para>ScaledAiryAiPrime(z) is given by Exp(zta) * AiryAiPrime(z), where zta = (2/3) * z * Sqrt(z).</para>
 /// </summary>
 /// <param name="z">The value to compute the derivative of the Airy function of.</param>
 /// <returns>The exponentially scaled derivative of the Airy function Ai.</returns>
 public static double AiryAiPrimeScaled(double z)
 {
     return(Amos.ScaledCairyPrime(z));
 }
Example #20
0
 /// <summary>
 /// Derivative of the Airy function Ai.
 /// <p/>
 /// If expScaled is true, returns Exp(zta) * d/dz Ai(z), where zta = (2/3) * z * Sqrt(z).
 /// </summary>
 /// <param name="z">The value to compute the derivative of the Airy function of.</param>
 /// <param name="expScaled">If true, returns exponentially-scaled Airy function</param>
 /// <returns></returns>
 public static Complex AiryAiPrime(Complex z, bool expScaled = false)
 {
     return((expScaled) ? Amos.ScaledCairyPrime(z) : Amos.CairyPrime(z));
 }