.NET wrapper for GeographicLib::SphericalHarmonic1. More...
#include <SphericalHarmonic1.h>
Public Types | |
enum | Normalization { Normalization::FULL, Normalization::SCHMIDT } |
Public Member Functions | |
CircularEngine | Circle (double tau, double p, double z, bool gradp) |
SphericalCoefficients | Coefficients () |
SphericalCoefficients | Coefficients1 () |
double | HarmonicSum (double tau, double x, double y, double z) |
double | HarmonicSum (double tau, double x, double y, double z, [System::Runtime::InteropServices::Out] double% gradx, [System::Runtime::InteropServices::Out] double% grady, [System::Runtime::InteropServices::Out] double% gradz) |
SphericalHarmonic1 (array< double >^ C, array< double >^ S, int N, array< double >^ C1, array< double >^ S1, int N1, double a, Normalization norm) | |
SphericalHarmonic1 (array< double >^ C, array< double >^ S, int N, int nmx, int mmx, array< double >^ C1, array< double >^ S1, int N1, int nmx1, int mmx1, double a, Normalization norm) | |
~SphericalHarmonic1 () | |
Private Member Functions | |
!SphericalHarmonic1 (void) | |
Private Attributes | |
std::vector< double > ** | m_C |
const GeographicLib::SphericalHarmonic1 * | m_pSphericalHarmonic1 |
std::vector< double > ** | m_S |
Static Private Attributes | |
static const int | m_numCoeffVectors = 2 |
.NET wrapper for GeographicLib::SphericalHarmonic1.
This class allows .NET applications to access GeographicLib::SphericalHarmonic1.
This class is similar to SphericalHarmonic, except that the coefficients Cnm are replaced by Cnm + tau C'nm (and similarly for Snm).
C# Example:
Managed C++ Example:
Visual Basic Example:
INTERFACE DIFFERENCES:
This class replaces the () operator with HarmonicSum().
Coefficients returns a SphericalCoefficients object.
Definition at line 38 of file SphericalHarmonic1.h.
Supported normalizations for associate Legendre polynomials.
Definition at line 56 of file SphericalHarmonic1.h.
|
private |
Definition at line 23 of file SphericalHarmonic1.cpp.
SphericalHarmonic1::SphericalHarmonic1 | ( | array< double >^ | C, |
array< double >^ | S, | ||
int | N, | ||
array< double >^ | C1, | ||
array< double >^ | S1, | ||
int | N1, | ||
double | a, | ||
Normalization | norm | ||
) |
Constructor with a full set of coefficients specified.
[in] | C | the coefficients Cnm. |
[in] | S | the coefficients Snm. |
[in] | N | the maximum degree and order of the sum |
[in] | C1 | the coefficients C'nm. |
[in] | S1 | the coefficients S'nm. |
[in] | N1 | the maximum degree and order of the correction coefficients C'nm and S'nm. |
[in] | a | the reference radius appearing in the definition of the sum. |
[in] | norm | the normalization for the associated Legendre polynomials, either SphericalHarmonic1::FULL (the default) or SphericalHarmonic1::SCHMIDT. |
GeographicErr | if N and N1 do not satisfy N ≥ N1 ≥ −1. |
GeographicErr | if any of the vectors of coefficients is not large enough. |
See SphericalHarmonic for the way the coefficients should be stored.
The class stores pointers to the first elements of C, S, C', and S'. These arrays should not be altered or destroyed during the lifetime of a SphericalHarmonic object.
Definition at line 51 of file SphericalHarmonic1.cpp.
SphericalHarmonic1::SphericalHarmonic1 | ( | array< double >^ | C, |
array< double >^ | S, | ||
int | N, | ||
int | nmx, | ||
int | mmx, | ||
array< double >^ | C1, | ||
array< double >^ | S1, | ||
int | N1, | ||
int | nmx1, | ||
int | mmx1, | ||
double | a, | ||
Normalization | norm | ||
) |
Constructor with a subset of coefficients specified.
[in] | C | the coefficients Cnm. |
[in] | S | the coefficients Snm. |
[in] | N | the degree used to determine the layout of C and S. |
[in] | nmx | the maximum degree used in the sum. The sum over n is from 0 thru nmx. |
[in] | mmx | the maximum order used in the sum. The sum over m is from 0 thru min(n, mmx). |
[in] | C1 | the coefficients C'nm. |
[in] | S1 | the coefficients S'nm. |
[in] | N1 | the degree used to determine the layout of C' and S'. |
[in] | nmx1 | the maximum degree used for C' and S'. |
[in] | mmx1 | the maximum order used for C' and S'. |
[in] | a | the reference radius appearing in the definition of the sum. |
[in] | norm | the normalization for the associated Legendre polynomials, either SphericalHarmonic1::FULL (the default) or SphericalHarmonic1::SCHMIDT. |
GeographicErr | if the parameters do not satisfy N ≥ nmx ≥ mmx ≥ −1; N1 ≥ nmx1 ≥ mmx1 ≥ −1; N ≥ N1; nmx ≥ nmx1; mmx ≥ mmx1. |
GeographicErr | if any of the vectors of coefficients is not large enough. |
The class stores pointers to the first elements of C, S, C', and S'. These arrays should not be altered or destroyed during the lifetime of a SphericalHarmonic object.
Definition at line 88 of file SphericalHarmonic1.cpp.
|
inline |
The destructor calls the finalizer.
Definition at line 151 of file SphericalHarmonic1.h.
CircularEngine SphericalHarmonic1::Circle | ( | double | tau, |
double | p, | ||
double | z, | ||
bool | gradp | ||
) |
Create a CircularEngine to allow the efficient evaluation of several points on a circle of latitude at a fixed value of tau.
[in] | tau | the multiplier for the correction coefficients. |
[in] | p | the radius of the circle. |
[in] | z | the height of the circle above the equatorial plane. |
[in] | gradp | if true the returned object will be able to compute the gradient of the sum. |
std::bad_alloc | if the memory for the CircularEngine can't be allocated. |
SphericalHarmonic1::operator()() exchanges the order of the sums in the definition, i.e., ∑n = 0..N ∑m = 0..n becomes ∑m = 0..N ∑n = m..N. SphericalHarmonic1::Circle performs the inner sum over degree n (which entails about N2 operations). Calling CircularEngine::operator()() on the returned object performs the outer sum over the order m (about N operations).
See SphericalHarmonic::Circle for an example of its use.
Definition at line 146 of file SphericalHarmonic1.cpp.
SphericalCoefficients SphericalHarmonic1::Coefficients | ( | ) |
Definition at line 159 of file SphericalHarmonic1.cpp.
SphericalCoefficients SphericalHarmonic1::Coefficients1 | ( | ) |
Definition at line 165 of file SphericalHarmonic1.cpp.
double SphericalHarmonic1::HarmonicSum | ( | double | tau, |
double | x, | ||
double | y, | ||
double | z | ||
) |
Compute a spherical harmonic sum with a correction term.
[in] | tau | multiplier for correction coefficients C' and S'. |
[in] | x | cartesian coordinate. |
[in] | y | cartesian coordinate. |
[in] | z | cartesian coordinate. |
This routine requires constant memory and thus never throws an exception.
Definition at line 126 of file SphericalHarmonic1.cpp.
double SphericalHarmonic1::HarmonicSum | ( | double | tau, |
double | x, | ||
double | y, | ||
double | z, | ||
[System::Runtime::InteropServices::Out] double% | gradx, | ||
[System::Runtime::InteropServices::Out] double% | grady, | ||
[System::Runtime::InteropServices::Out] double% | gradz | ||
) |
Compute a spherical harmonic sum with a correction term and its gradient.
[in] | tau | multiplier for correction coefficients C' and S'. |
[in] | x | cartesian coordinate. |
[in] | y | cartesian coordinate. |
[in] | z | cartesian coordinate. |
[out] | gradx | x component of the gradient |
[out] | grady | y component of the gradient |
[out] | gradz | z component of the gradient |
This is the same as the previous function, except that the components of the gradients of the sum in the x, y, and z directions are computed. This routine requires constant memory and thus never throws an exception.
Definition at line 132 of file SphericalHarmonic1.cpp.
|
private |
Definition at line 51 of file SphericalHarmonic1.h.
|
staticprivate |
Definition at line 47 of file SphericalHarmonic1.h.
|
private |
Definition at line 42 of file SphericalHarmonic1.h.
|
private |
Definition at line 51 of file SphericalHarmonic1.h.