|
GeographicLib
1.21
|
Package up coefficients for SphericalEngine. More...
#include <GeographicLib/SphericalEngine.hpp>
Public Member Functions | |
| coeff () | |
| coeff (const std::vector< real > &C, const std::vector< real > &S, int N, int nmx, int mmx) | |
| coeff (const std::vector< real > &C, const std::vector< real > &S, int N) | |
| int | N () const throw () |
| int | nmx () const throw () |
| int | mmx () const throw () |
| int | index (int n, int m) const throw () |
| Math::real | Cv (int k) const |
| Math::real | Sv (int k) const |
| Math::real | Cv (int k, int n, int m, real f) const |
| Math::real | Sv (int k, int n, int m, real f) const |
Static Public Member Functions | |
| static int | Csize (int N, int M) |
| static int | Ssize (int N, int M) |
| static void | readcoeffs (std::istream &stream, int &N, int &M, std::vector< real > &C, std::vector< real > &S) |
Package up coefficients for SphericalEngine.
This packages up the C, S coefficients and information about how the coefficients are stored into a single structure. This allows a vector of type SphericalEngine::coeff to be passed to SphericalEngine::Value. This class also includes functions to aid indexing into C and S.
The storage layout of the coefficients is documented in SphericalHarmonic and SphericalHarmonic::SphericalHarmonic.
| GeographicLib::SphericalEngine::coeff::coeff | ( | ) | [inline] |
A default constructor
Definition at line 101 of file SphericalEngine.hpp.
| GeographicLib::SphericalEngine::coeff::coeff | ( | const std::vector< real > & | C, |
| const std::vector< real > & | S, | ||
| int | N, | ||
| int | nmx, | ||
| int | mmx | ||
| ) | [inline] |
The general constructor.
| [in] | C | a vector of coefficients for the cosine terms. |
| [in] | S | a vector of coefficients for the sine terms. |
| [in] | N | the degree giving storage layout for C and S. |
| [in] | nmx | the maximum degree to be used. |
| [in] | mmx | the maximum order to be used. |
This requires N >= nmx >= mmx >= -1. C and S must also be large enough to hold the coefficients. Otherwise an exception is thrown.
Definition at line 120 of file SphericalEngine.hpp.
References GeographicLib::SphericalEngine::RootTable().
| GeographicLib::SphericalEngine::coeff::coeff | ( | const std::vector< real > & | C, |
| const std::vector< real > & | S, | ||
| int | N | ||
| ) | [inline] |
The constructor for full coefficient vectors.
| [in] | C | a vector of coefficients for the cosine terms. |
| [in] | S | a vector of coefficients for the sine terms. |
| [in] | N | the maximum degree and order. |
This requires N >= -1. C and S must also be large enough to hold the coefficients. Otherwise an exception is thrown.
Definition at line 146 of file SphericalEngine.hpp.
References GeographicLib::SphericalEngine::RootTable().
| int GeographicLib::SphericalEngine::coeff::N | ( | ) | const throw () [inline] |
Definition at line 165 of file SphericalEngine.hpp.
Referenced by GeographicLib::GravityModel::GravityModel().
| int GeographicLib::SphericalEngine::coeff::nmx | ( | ) | const throw () [inline] |
Definition at line 169 of file SphericalEngine.hpp.
Referenced by GeographicLib::GravityModel::GravityModel(), and GeographicLib::SphericalEngine::Circle().
| int GeographicLib::SphericalEngine::coeff::mmx | ( | ) | const throw () [inline] |
Definition at line 173 of file SphericalEngine.hpp.
Referenced by GeographicLib::GravityModel::GravityModel(), and GeographicLib::SphericalEngine::Circle().
| int GeographicLib::SphericalEngine::coeff::index | ( | int | n, |
| int | m | ||
| ) | const throw () [inline] |
The one-dimensional index into C and S.
| [in] | n | the degree. |
| [in] | m | the order. |
Definition at line 181 of file SphericalEngine.hpp.
| Math::real GeographicLib::SphericalEngine::coeff::Cv | ( | int | k | ) | const [inline] |
An element of C.
| [in] | k | the one-dimensional index. |
Definition at line 189 of file SphericalEngine.hpp.
Referenced by GeographicLib::SphericalEngine::Circle().
| Math::real GeographicLib::SphericalEngine::coeff::Sv | ( | int | k | ) | const [inline] |
An element of S.
| [in] | k | the one-dimensional index. |
Definition at line 196 of file SphericalEngine.hpp.
Referenced by GeographicLib::SphericalEngine::Circle().
| Math::real GeographicLib::SphericalEngine::coeff::Cv | ( | int | k, |
| int | n, | ||
| int | m, | ||
| real | f | ||
| ) | const [inline] |
An element of C with checking.
| [in] | k | the one-dimensional index. |
| [in] | n | the requested degree. |
| [in] | m | the requested order. |
| [in] | f | a multiplier. |
Definition at line 207 of file SphericalEngine.hpp.
| Math::real GeographicLib::SphericalEngine::coeff::Sv | ( | int | k, |
| int | n, | ||
| int | m, | ||
| real | f | ||
| ) | const [inline] |
An element of S with checking.
| [in] | k | the one-dimensional index. |
| [in] | n | the requested degree. |
| [in] | m | the requested order. |
| [in] | f | a multiplier. |
Definition at line 219 of file SphericalEngine.hpp.
| static int GeographicLib::SphericalEngine::coeff::Csize | ( | int | N, |
| int | M | ||
| ) | [inline, static] |
The size of the coefficient vector for the cosine terms.
| [in] | N | the maximum degree. |
| [in] | M | the maximum order. |
Definition at line 230 of file SphericalEngine.hpp.
| static int GeographicLib::SphericalEngine::coeff::Ssize | ( | int | N, |
| int | M | ||
| ) | [inline, static] |
The size of the coefficient vector for the sine terms.
| [in] | N | the maximum degree. |
| [in] | M | the maximum order. |
Definition at line 241 of file SphericalEngine.hpp.
| void GeographicLib::SphericalEngine::coeff::readcoeffs | ( | std::istream & | stream, |
| int & | N, | ||
| int & | M, | ||
| std::vector< real > & | C, | ||
| std::vector< real > & | S | ||
| ) | [static] |
Load coefficients from a binary stream.
| [in] | stream | the input stream. |
| [out] | N | The maximum degree of the coefficients. |
| [out] | M | The maximum order of the coefficients. |
| [out] | C | The vector of cosine coefficients. |
| [out] | S | The vector of sine coefficients. |
N and M are read as 4-byte ints. C and S are resized to accommodate all the coefficients (with the m = 0 coefficients for S excluded) and the data for these coefficients read as 8-byte doubles. The coefficients are stored in column major order. The bytes in the stream should use little-endian ordering. IEEE floating point is assumed for the coefficients.
Definition at line 382 of file SphericalEngine.cpp.
Referenced by GeographicLib::GravityModel::GravityModel(), and GeographicLib::MagneticModel::MagneticModel().
1.7.5