Class Bessel
- java.lang.Object
-
- com.opengamma.strata.math.impl.cern.Bessel
-
public class Bessel extends Object
Bessel and Airy functions.
-
-
Field Summary
Fields Modifier and Type Field Description protected static double[]A_i0Chebyshev coefficients for exp(-x) I0(x) in the interval [0,8].protected static double[]A_i1Chebyshev coefficients for exp(-x) I1(x) / x in the interval [0,8].protected static double[]A_k0COEFFICIENTS FOR METHODS k0, k0e *protected static double[]A_k1COEFFICIENTS FOR METHODS k1, k1e *protected static double[]B_i0Chebyshev coefficients for exp(-x) sqrt(x) I0(x) in the inverted interval [8,infinity].protected static double[]B_i1protected static double[]B_k0protected static double[]B_k1protected static doublebigprotected static doublebiginvprotected static doubleLOGPIprotected static doubleMACHEPprotected static doubleMAXGAMprotected static doubleMAXLOGprotected static doubleMINLOGprotected static doubleSQRTHprotected static doubleSQTPI
-
Constructor Summary
Constructors Modifier Constructor Description protectedBessel()Makes this class non instantiable, but still let's others inherit from it.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static doublei0(double x)Returns the modified Bessel function of order 0 of the argument.static doublei0e(double x)Returns the exponentially scaled modified Bessel function of order 0 of the argument.static doublei1(double x)Returns the modified Bessel function of order 1 of the argument.static doublei1e(double x)Returns the exponentially scaled modified Bessel function of order 1 of the argument.static doublej0(double x)Returns the Bessel function of the first kind of order 0 of the argument.static doublej1(double x)Returns the Bessel function of the first kind of order 1 of the argument.static doublejn(int n, double x)Returns the Bessel function of the first kind of order n of the argument.static doublek0(double x)Returns the modified Bessel function of the third kind of order 0 of the argument.static doublek0e(double x)Returns the exponentially scaled modified Bessel function of the third kind of order 0 of the argument.static doublek1(double x)Returns the modified Bessel function of the third kind of order 1 of the argument.static doublek1e(double x)Returns the exponentially scaled modified Bessel function of the third kind of order 1 of the argument.static doublekn(int nn, double x)Returns the modified Bessel function of the third kind of order nn of the argument.static doubley0(double x)Returns the Bessel function of the second kind of order 0 of the argument.static doubley1(double x)Returns the Bessel function of the second kind of order 1 of the argument.static doubleyn(int n, double x)Returns the Bessel function of the second kind of order n of the argument.
-
-
-
Field Detail
-
A_i0
protected static final double[] A_i0
Chebyshev coefficients for exp(-x) I0(x) in the interval [0,8]. lim(x->0){ exp(-x) I0(x) } = 1.
-
B_i0
protected static final double[] B_i0
Chebyshev coefficients for exp(-x) sqrt(x) I0(x) in the inverted interval [8,infinity]. lim(x->inf){ exp(-x) sqrt(x) I0(x) } = 1/sqrt(2pi).
-
A_i1
protected static final double[] A_i1
Chebyshev coefficients for exp(-x) I1(x) / x in the interval [0,8]. lim(x->0){ exp(-x) I1(x) / x } = 1/2.
-
B_i1
protected static final double[] B_i1
-
A_k0
protected static final double[] A_k0
COEFFICIENTS FOR METHODS k0, k0e *
-
B_k0
protected static final double[] B_k0
-
A_k1
protected static final double[] A_k1
COEFFICIENTS FOR METHODS k1, k1e *
-
B_k1
protected static final double[] B_k1
-
MACHEP
protected static final double MACHEP
- See Also:
- Constant Field Values
-
MAXLOG
protected static final double MAXLOG
- See Also:
- Constant Field Values
-
MINLOG
protected static final double MINLOG
- See Also:
- Constant Field Values
-
MAXGAM
protected static final double MAXGAM
- See Also:
- Constant Field Values
-
SQTPI
protected static final double SQTPI
- See Also:
- Constant Field Values
-
SQRTH
protected static final double SQRTH
- See Also:
- Constant Field Values
-
LOGPI
protected static final double LOGPI
- See Also:
- Constant Field Values
-
big
protected static final double big
- See Also:
- Constant Field Values
-
biginv
protected static final double biginv
- See Also:
- Constant Field Values
-
-
Method Detail
-
i0
public static double i0(double x) throws ArithmeticExceptionReturns the modified Bessel function of order 0 of the argument.The function is defined as i0(x) = j0( ix ).
The range is partitioned into the two intervals [0,8] and (8, infinity). Chebyshev polynomial expansions are employed in each interval.
- Parameters:
x- the value to compute the bessel function of.- Returns:
- result
- Throws:
ArithmeticException- error
-
i0e
public static double i0e(double x) throws ArithmeticExceptionReturns the exponentially scaled modified Bessel function of order 0 of the argument.The function is defined as i0e(x) = exp(-|x|) j0( ix ).
- Parameters:
x- the value to compute the bessel function of.- Returns:
- result
- Throws:
ArithmeticException- error
-
i1
public static double i1(double x) throws ArithmeticExceptionReturns the modified Bessel function of order 1 of the argument.The function is defined as i1(x) = -i j1( ix ).
The range is partitioned into the two intervals [0,8] and (8, infinity). Chebyshev polynomial expansions are employed in each interval.
- Parameters:
x- the value to compute the bessel function of.- Returns:
- result
- Throws:
ArithmeticException- error
-
i1e
public static double i1e(double x) throws ArithmeticExceptionReturns the exponentially scaled modified Bessel function of order 1 of the argument.The function is defined as i1(x) = -i exp(-|x|) j1( ix ).
- Parameters:
x- the value to compute the bessel function of.- Returns:
- result
- Throws:
ArithmeticException- error
-
j0
public static double j0(double x) throws ArithmeticExceptionReturns the Bessel function of the first kind of order 0 of the argument.- Parameters:
x- the value to compute the bessel function of.- Returns:
- result
- Throws:
ArithmeticException- error
-
j1
public static double j1(double x) throws ArithmeticExceptionReturns the Bessel function of the first kind of order 1 of the argument.- Parameters:
x- the value to compute the bessel function of.- Returns:
- result
- Throws:
ArithmeticException- error
-
jn
public static double jn(int n, double x) throws ArithmeticExceptionReturns the Bessel function of the first kind of order n of the argument.- Parameters:
n- the order of the Bessel function.x- the value to compute the bessel function of.- Returns:
- result
- Throws:
ArithmeticException- error
-
k0
public static double k0(double x) throws ArithmeticExceptionReturns the modified Bessel function of the third kind of order 0 of the argument.The range is partitioned into the two intervals [0,8] and (8, infinity). Chebyshev polynomial expansions are employed in each interval.
- Parameters:
x- the value to compute the bessel function of.- Returns:
- result
- Throws:
ArithmeticException- error
-
k0e
public static double k0e(double x) throws ArithmeticExceptionReturns the exponentially scaled modified Bessel function of the third kind of order 0 of the argument.- Parameters:
x- the value to compute the bessel function of.- Returns:
- result
- Throws:
ArithmeticException- error
-
k1
public static double k1(double x) throws ArithmeticExceptionReturns the modified Bessel function of the third kind of order 1 of the argument.The range is partitioned into the two intervals [0,2] and (2, infinity). Chebyshev polynomial expansions are employed in each interval.
- Parameters:
x- the value to compute the bessel function of.- Returns:
- result
- Throws:
ArithmeticException- error
-
k1e
public static double k1e(double x) throws ArithmeticExceptionReturns the exponentially scaled modified Bessel function of the third kind of order 1 of the argument.k1e(x) = exp(x) * k1(x).
- Parameters:
x- the value to compute the bessel function of.- Returns:
- result
- Throws:
ArithmeticException- error
-
kn
public static double kn(int nn, double x) throws ArithmeticExceptionReturns the modified Bessel function of the third kind of order nn of the argument.The range is partitioned into the two intervals [0,9.55] and (9.55, infinity). An ascending power series is used in the low range, and an asymptotic expansion in the high range.
- Parameters:
nn- the order of the Bessel function.x- the value to compute the bessel function of.- Returns:
- result
- Throws:
ArithmeticException- error
-
y0
public static double y0(double x) throws ArithmeticExceptionReturns the Bessel function of the second kind of order 0 of the argument.- Parameters:
x- the value to compute the bessel function of.- Returns:
- result
- Throws:
ArithmeticException- error
-
y1
public static double y1(double x) throws ArithmeticExceptionReturns the Bessel function of the second kind of order 1 of the argument.- Parameters:
x- the value to compute the bessel function of.- Returns:
- result
- Throws:
ArithmeticException- error
-
yn
public static double yn(int n, double x) throws ArithmeticExceptionReturns the Bessel function of the second kind of order n of the argument.- Parameters:
n- the order of the Bessel function.x- the value to compute the bessel function of.- Returns:
- result
- Throws:
ArithmeticException- error
-
-