using Complex = System.Numerics.Complex;
namespace IStation.Numerics
{
///
/// This partial implementation of the SpecialFunctions class contains all methods related to the Hankel function.
///
public static partial class SpecialFunctions
{
///
/// Returns the Hankel function of the first kind.
/// HankelH1(n, z) is defined as BesselJ(n, z) + j * BesselY(n, z).
///
/// The order of the Hankel function.
/// The value to compute the Hankel function of.
/// The Hankel function of the first kind.
public static Complex HankelH1(double n, Complex z)
{
return Amos.Cbesh1(n, z);
}
///
/// Returns the exponentially scaled Hankel function of the first kind.
/// ScaledHankelH1(n, z) is given by Exp(-z * j) * HankelH1(n, z) where j = Sqrt(-1).
///
/// The order of the Hankel function.
/// The value to compute the Hankel function of.
/// The exponentially scaled Hankel function of the first kind.
public static Complex HankelH1Scaled(double n, Complex z)
{
return Amos.ScaledCbesh1(n, z);
}
///
/// Returns the Hankel function of the second kind.
/// HankelH2(n, z) is defined as BesselJ(n, z) - j * BesselY(n, z).
///
/// The order of the Hankel function.
/// The value to compute the Hankel function of.
/// The Hankel function of the second kind.
public static Complex HankelH2(double n, Complex z)
{
return Amos.Cbesh2(n, z);
}
///
/// Returns the exponentially scaled Hankel function of the second kind.
/// ScaledHankelH2(n, z) is given by Exp(z * j) * HankelH2(n, z) where j = Sqrt(-1).
///
/// The order of the Hankel function.
/// The value to compute the Hankel function of.
/// The exponentially scaled Hankel function of the second kind.
public static Complex HankelH2Scaled(double n, Complex z)
{
return Amos.ScaledCbesh2(n, z);
}
}
}