NETGeographicLib
1.51
|
.NET wrapper for GeographicLib::EllipticFunction. More...
#include <NETGeographicLib/EllipticFunction.h>
Public Member Functions | |
Constructor | |
EllipticFunction (double k2, double alpha2) | |
EllipticFunction (double k2, double alpha2, double kp2, double alphap2) | |
~EllipticFunction () | |
void | Reset (double k2, double alpha2) |
void | Reset (double k2, double alpha2, double kp2, double alphap2) |
Complete elliptic integrals. | |
double | K () |
double | E () |
double | D () |
double | KE () |
double | Pi () |
double | G () |
double | H () |
Incomplete elliptic integrals. | |
double | F (double phi) |
double | E (double phi) |
double | Ed (double ang) |
double | Einv (double x) |
double | Pi (double phi) |
double | D (double phi) |
double | G (double phi) |
double | H (double phi) |
Incomplete integrals in terms of Jacobi elliptic functions. | |
double | F (double sn, double cn, double dn) |
double | E (double sn, double cn, double dn) |
double | Pi (double sn, double cn, double dn) |
double | D (double sn, double cn, double dn) |
double | G (double sn, double cn, double dn) |
double | H (double sn, double cn, double dn) |
Periodic versions of incomplete elliptic integrals. | |
double | deltaF (double sn, double cn, double dn) |
double | deltaE (double sn, double cn, double dn) |
double | deltaEinv (double stau, double ctau) |
double | deltaPi (double sn, double cn, double dn) |
double | deltaD (double sn, double cn, double dn) |
double | deltaG (double sn, double cn, double dn) |
double | deltaH (double sn, double cn, double dn) |
Elliptic functions. | |
void | sncndn (double x, [System::Runtime::InteropServices::Out] double% sn, [System::Runtime::InteropServices::Out] double% cn, [System::Runtime::InteropServices::Out] double% dn) |
double | Delta (double sn, double cn) |
Static Public Member Functions | |
Symmetric elliptic integrals. | |
static double | RF (double x, double y, double z) |
static double | RF (double x, double y) |
static double | RC (double x, double y) |
static double | RG (double x, double y, double z) |
static double | RG (double x, double y) |
static double | RJ (double x, double y, double z, double p) |
static double | RD (double x, double y, double z) |
Properties | |
Inspector functions. | |
double | k2 [get] |
double | kp2 [get] |
double | alpha2 [get] |
double | alphap2 [get] |
.NET wrapper for GeographicLib::EllipticFunction.
This class allows .NET applications to access GeographicLib::EllipticFunction.
This provides the elliptic functions and integrals needed for Ellipsoid, GeodesicExact, and TransverseMercatorExact. Two categories of function are provided:
In the latter case, an object is constructed giving the modulus k (and optionally the parameter α2). The modulus is always passed as its square k2 which allows k to be pure imaginary (k2 < 0). (Confusingly, Abramowitz and Stegun call m = k2 the "parameter" and n = α2 the "characteristic".)
In geodesic applications, it is convenient to separate the incomplete integrals into secular and periodic components, e.g.,
\[ E(\phi, k) = (2 E(\phi) / \pi) [ \phi + \delta E(\phi, k) ] \]
where δE(φ, k) is an odd periodic function with period π.
The computation of the elliptic integrals uses the algorithms given in
with the additional optimizations given in https://dlmf.nist.gov/19.36.i. The computation of the Jacobi elliptic functions uses the algorithm given in
The notation follows https://dlmf.nist.gov/19 and https://dlmf.nist.gov/22
C# Example:
Managed C++ Example:
Visual Basic Example:
INTERFACE DIFFERENCES:
The k2, kp2, alpha2, and alphap2 functions are implemented as properties.
Definition at line 69 of file EllipticFunction.h.
NETGeographicLib::EllipticFunction::EllipticFunction | ( | double | k2, |
double | alpha2 | ||
) |
Constructor specifying the modulus and parameter.
[in] | k2 | the square of the modulus k2. k2 must lie in (-∞, 1). (No checking is done.) |
[in] | alpha2 | the parameter α2. α2 must lie in (-∞, 1). (No checking is done.) |
If only elliptic integrals of the first and second kinds are needed, then set α2 = 0 (the default value); in this case, we have Π(φ, 0, k) = F(φ, k), G(φ, 0, k) = E(φ, k), and H(φ, 0, k) = F(φ, k) - D(φ, k).
Referenced by ~EllipticFunction().
NETGeographicLib::EllipticFunction::EllipticFunction | ( | double | k2, |
double | alpha2, | ||
double | kp2, | ||
double | alphap2 | ||
) |
Constructor specifying the modulus and parameter and their complements.
[in] | k2 | the square of the modulus k2. k2 must lie in (-∞, 1). (No checking is done.) |
[in] | alpha2 | the parameter α2. α2 must lie in (-∞, 1). (No checking is done.) |
[in] | kp2 | the complementary modulus squared k'2 = 1 − k2. |
[in] | alphap2 | the complementary parameter α'2 = 1 − α2. |
The arguments must satisfy k2 + kp2 = 1 and alpha2 + alphap2 = 1. (No checking is done that these conditions are met.) This constructor is provided to enable accuracy to be maintained, e.g., when k is very close to unity.
|
inline |
Destructor calls the finalizer.
Definition at line 121 of file EllipticFunction.h.
References EllipticFunction().
void NETGeographicLib::EllipticFunction::Reset | ( | double | k2, |
double | alpha2 | ||
) |
Reset the modulus and parameter.
[in] | k2 | the new value of square of the modulus k2 which must lie in (-∞, 1). (No checking is done.) |
[in] | alpha2 | the new value of parameter α2. α2 must lie in (-∞, 1). (No checking is done.) |
void NETGeographicLib::EllipticFunction::Reset | ( | double | k2, |
double | alpha2, | ||
double | kp2, | ||
double | alphap2 | ||
) |
Reset the modulus and parameter supplying also their complements.
[in] | k2 | the square of the modulus k2. k2 must lie in (-∞, 1). (No checking is done.) |
[in] | alpha2 | the parameter α2. α2 must lie in (-∞, 1). (No checking is done.) |
[in] | kp2 | the complementary modulus squared k'2 = 1 − k2. |
[in] | alphap2 | the complementary parameter α'2 = 1 − α2. |
The arguments must satisfy k2 + kp2 = 1 and alpha2 + alphap2 = 1. (No checking is done that these conditions are met.) This constructor is provided to enable accuracy to be maintained, e.g., when is very small.
double NETGeographicLib::EllipticFunction::K | ( | ) |
The complete integral of the first kind.
K(k) is defined in https://dlmf.nist.gov/19.2.E4
\[ K(k) = \int_0^{\pi/2} \frac1{\sqrt{1-k^2\sin^2\phi}}\,d\phi. \]
double NETGeographicLib::EllipticFunction::E | ( | ) |
The complete integral of the second kind.
E(k) is defined in https://dlmf.nist.gov/19.2.E5
\[ E(k) = \int_0^{\pi/2} \sqrt{1-k^2\sin^2\phi}\,d\phi. \]
double NETGeographicLib::EllipticFunction::D | ( | ) |
Jahnke's complete integral.
D(k) is defined in https://dlmf.nist.gov/19.2.E6
\[ D(k) = \int_0^{\pi/2} \frac{\sin^2\phi}{\sqrt{1-k^2\sin^2\phi}}\,d\phi. \]
double NETGeographicLib::EllipticFunction::KE | ( | ) |
The difference between the complete integrals of the first and second kinds.
double NETGeographicLib::EllipticFunction::Pi | ( | ) |
The complete integral of the third kind.
Π(α2, k) is defined in https://dlmf.nist.gov/19.2.E7
\[ \Pi(\alpha^2, k) = \int_0^{\pi/2} \frac1{\sqrt{1-k^2\sin^2\phi}(1 - \alpha^2\sin^2\phi_)}\,d\phi. \]
double NETGeographicLib::EllipticFunction::G | ( | ) |
Legendre's complete geodesic longitude integral.
G(α2, k) is given by
\[ G(\alpha^2, k) = \int_0^{\pi/2} \frac{\sqrt{1-k^2\sin^2\phi}}{1 - \alpha^2\sin^2\phi}\,d\phi. \]
double NETGeographicLib::EllipticFunction::H | ( | ) |
Cayley's complete geodesic longitude difference integral.
H(α2, k) is given by
\[ H(\alpha^2, k) = \int_0^{\pi/2} \frac{\cos^2\phi}{(1-\alpha^2\sin^2\phi)\sqrt{1-k^2\sin^2\phi}} \,d\phi. \]
double NETGeographicLib::EllipticFunction::F | ( | double | phi | ) |
The incomplete integral of the first kind.
[in] | phi |
F(φ, k) is defined in https://dlmf.nist.gov/19.2.E4
\[ F(\phi, k) = \int_0^\phi \frac1{\sqrt{1-k^2\sin^2\theta}}\,d\theta. \]
double NETGeographicLib::EllipticFunction::E | ( | double | phi | ) |
The incomplete integral of the second kind.
[in] | phi |
E(φ, k) is defined in https://dlmf.nist.gov/19.2.E5
\[ E(\phi, k) = \int_0^\phi \sqrt{1-k^2\sin^2\theta}\,d\theta. \]
double NETGeographicLib::EllipticFunction::Ed | ( | double | ang | ) |
The incomplete integral of the second kind with the argument given in degrees.
[in] | ang | in degrees. |
double NETGeographicLib::EllipticFunction::Einv | ( | double | x | ) |
The inverse of the incomplete integral of the second kind.
[in] | x |
double NETGeographicLib::EllipticFunction::Pi | ( | double | phi | ) |
The incomplete integral of the third kind.
[in] | phi |
Π(φ, α2, k) is defined in https://dlmf.nist.gov/19.2.E7
\[ \Pi(\phi, \alpha^2, k) = \int_0^\phi \frac1{\sqrt{1-k^2\sin^2\theta}(1 - \alpha^2\sin^2\theta_)}\,d\theta. \]
double NETGeographicLib::EllipticFunction::D | ( | double | phi | ) |
Jahnke's incomplete elliptic integral.
[in] | phi |
D(φ, k) is defined in https://dlmf.nist.gov/19.2.E4
\[ D(\phi, k) = \int_0^\phi \frac{\sin^2\theta}{\sqrt{1-k^2\sin^2\theta}}\,d\theta. \]
double NETGeographicLib::EllipticFunction::G | ( | double | phi | ) |
Legendre's geodesic longitude integral.
[in] | phi |
G(φ, α2, k) is defined by
\[ \begin{aligned} G(\phi, \alpha^2, k) &= \frac{k^2}{\alpha^2} F(\phi, k) + \biggl(1 - \frac{k^2}{\alpha^2}\biggr) \Pi(\phi, \alpha^2, k) \\ &= \int_0^\phi \frac{\sqrt{1-k^2\sin^2\theta}}{1 - \alpha^2\sin^2\theta}\,d\theta. \end{aligned} \]
Legendre expresses the longitude of a point on the geodesic in terms of this combination of elliptic integrals in Exercices de Calcul Intégral, Vol. 1 (1811), p. 181, https://books.google.com/books?id=riIOAAAAQAAJ&pg=PA181.
See Geodesics in terms of elliptic integrals for the expression for the longitude in terms of this function.
double NETGeographicLib::EllipticFunction::H | ( | double | phi | ) |
Cayley's geodesic longitude difference integral.
[in] | phi |
H(φ, α2, k) is defined by
\[ \begin{aligned} H(\phi, \alpha^2, k) &= \frac1{\alpha^2} F(\phi, k) + \biggl(1 - \frac1{\alpha^2}\biggr) \Pi(\phi, \alpha^2, k) \\ &= \int_0^\phi \frac{\cos^2\theta}{(1-\alpha^2\sin^2\theta)\sqrt{1-k^2\sin^2\theta}} \,d\theta. \end{aligned} \]
Cayley expresses the longitude difference of a point on the geodesic in terms of this combination of elliptic integrals in Phil. Mag. 40 (1870), p. 333, https://books.google.com/books?id=Zk0wAAAAIAAJ&pg=PA333.
See Geodesics in terms of elliptic integrals for the expression for the longitude in terms of this function.
double NETGeographicLib::EllipticFunction::F | ( | double | sn, |
double | cn, | ||
double | dn | ||
) |
The incomplete integral of the first kind in terms of Jacobi elliptic functions.
[in] | sn | = sinφ |
[in] | cn | = cosφ |
[in] | dn | = sqrt(1 − k2 sin2φ) |
double NETGeographicLib::EllipticFunction::E | ( | double | sn, |
double | cn, | ||
double | dn | ||
) |
The incomplete integral of the second kind in terms of Jacobi elliptic functions.
[in] | sn | = sinφ |
[in] | cn | = cosφ |
[in] | dn | = sqrt(1 − k2 sin2φ) |
double NETGeographicLib::EllipticFunction::Pi | ( | double | sn, |
double | cn, | ||
double | dn | ||
) |
The incomplete integral of the third kind in terms of Jacobi elliptic functions.
[in] | sn | = sinφ |
[in] | cn | = cosφ |
[in] | dn | = sqrt(1 − k2 sin2φ) |
double NETGeographicLib::EllipticFunction::D | ( | double | sn, |
double | cn, | ||
double | dn | ||
) |
Jahnke's incomplete elliptic integral in terms of Jacobi elliptic functions.
[in] | sn | = sinφ |
[in] | cn | = cosφ |
[in] | dn | = sqrt(1 − k2 sin2φ) |
double NETGeographicLib::EllipticFunction::G | ( | double | sn, |
double | cn, | ||
double | dn | ||
) |
Legendre's geodesic longitude integral in terms of Jacobi elliptic functions.
[in] | sn | = sinφ |
[in] | cn | = cosφ |
[in] | dn | = sqrt(1 − k2 sin2φ) |
double NETGeographicLib::EllipticFunction::H | ( | double | sn, |
double | cn, | ||
double | dn | ||
) |
Cayley's geodesic longitude difference integral in terms of Jacobi elliptic functions.
[in] | sn | = sinφ |
[in] | cn | = cosφ |
[in] | dn | = sqrt(1 − k2 sin2φ) |
double NETGeographicLib::EllipticFunction::deltaF | ( | double | sn, |
double | cn, | ||
double | dn | ||
) |
The periodic incomplete integral of the first kind.
[in] | sn | = sinφ |
[in] | cn | = cosφ |
[in] | dn | = sqrt(1 − k2 sin2φ) |
double NETGeographicLib::EllipticFunction::deltaE | ( | double | sn, |
double | cn, | ||
double | dn | ||
) |
The periodic incomplete integral of the second kind.
[in] | sn | = sinφ |
[in] | cn | = cosφ |
[in] | dn | = sqrt(1 − k2 sin2φ) |
double NETGeographicLib::EllipticFunction::deltaEinv | ( | double | stau, |
double | ctau | ||
) |
The periodic inverse of the incomplete integral of the second kind.
[in] | stau | = sinτ |
[in] | ctau | = sinτ |
double NETGeographicLib::EllipticFunction::deltaPi | ( | double | sn, |
double | cn, | ||
double | dn | ||
) |
The periodic incomplete integral of the third kind.
[in] | sn | = sinφ |
[in] | cn | = cosφ |
[in] | dn | = sqrt(1 − k2 sin2φ) |
double NETGeographicLib::EllipticFunction::deltaD | ( | double | sn, |
double | cn, | ||
double | dn | ||
) |
The periodic Jahnke's incomplete elliptic integral.
[in] | sn | = sinφ |
[in] | cn | = cosφ |
[in] | dn | = sqrt(1 − k2 sin2φ) |
double NETGeographicLib::EllipticFunction::deltaG | ( | double | sn, |
double | cn, | ||
double | dn | ||
) |
Legendre's periodic geodesic longitude integral.
[in] | sn | = sinφ |
[in] | cn | = cosφ |
[in] | dn | = sqrt(1 − k2 sin2φ) |
double NETGeographicLib::EllipticFunction::deltaH | ( | double | sn, |
double | cn, | ||
double | dn | ||
) |
Cayley's periodic geodesic longitude difference integral.
[in] | sn | = sinφ |
[in] | cn | = cosφ |
[in] | dn | = sqrt(1 − k2 sin2φ) |
void NETGeographicLib::EllipticFunction::sncndn | ( | double | x, |
[System::Runtime::InteropServices::Out] double% | sn, | ||
[System::Runtime::InteropServices::Out] double% | cn, | ||
[System::Runtime::InteropServices::Out] double% | dn | ||
) |
The Jacobi elliptic functions.
[in] | x | the argument. |
[out] | sn | sn(x, k). |
[out] | cn | cn(x, k). |
[out] | dn | dn(x, k). |
double NETGeographicLib::EllipticFunction::Delta | ( | double | sn, |
double | cn | ||
) |
The Δ amplitude function.
[in] | sn | sinφ |
[in] | cn | cosφ |
|
static |
Symmetric integral of the first kind RF.
[in] | x | |
[in] | y | |
[in] | z |
RF is defined in https://dlmf.nist.gov/19.16.E1
\[ R_F(x, y, z) = \frac12 \int_0^\infty\frac1{\sqrt{(t + x) (t + y) (t + z)}}\, dt \]
If one of the arguments is zero, it is more efficient to call the two-argument version of this function with the non-zero arguments.
|
static |
Complete symmetric integral of the first kind, RF with one argument zero.
[in] | x | |
[in] | y |
|
static |
Degenerate symmetric integral of the first kind RC.
[in] | x | |
[in] | y |
RC is defined in https://dlmf.nist.gov/19.2.E17
\[ R_C(x, y) = \frac12 \int_0^\infty\frac1{\sqrt{t + x}(t + y)}\,dt \]
|
static |
Symmetric integral of the second kind RG.
[in] | x | |
[in] | y | |
[in] | z |
RG is defined in Carlson, eq 1.5
\[ R_G(x, y, z) = \frac14 \int_0^\infty[(t + x) (t + y) (t + z)]^{-1/2} \biggl( \frac x{t + x} + \frac y{t + y} + \frac z{t + z} \biggr)t\,dt \]
See also https://dlmf.nist.gov/19.16.E3. If one of the arguments is zero, it is more efficient to call the two-argument version of this function with the non-zero arguments.
|
static |
Complete symmetric integral of the second kind, RG with one argument zero.
[in] | x | |
[in] | y |
|
static |
Symmetric integral of the third kind RJ.
[in] | x | |
[in] | y | |
[in] | z | |
[in] | p |
RJ is defined in https://dlmf.nist.gov/19.16.E2
\[ R_J(x, y, z, p) = \frac32 \int_0^\infty[(t + x) (t + y) (t + z)]^{-1/2} (t + p)^{-1}\, dt \]
|
static |
Degenerate symmetric integral of the third kind RD.
[in] | x | |
[in] | y | |
[in] | z |
RD is defined in https://dlmf.nist.gov/19.16.E5
\[ R_D(x, y, z) = \frac32 \int_0^\infty[(t + x) (t + y)]^{-1/2} (t + z)^{-3/2}\, dt \]
|
get |
Definition at line 153 of file EllipticFunction.h.
|
get |
Definition at line 153 of file EllipticFunction.h.
|
get |
Definition at line 153 of file EllipticFunction.h.
|
get |
Definition at line 153 of file EllipticFunction.h.