10 #if !defined(GEOGRAPHICLIB_SPHERICALENGINE_HPP) 11 #define GEOGRAPHICLIB_SPHERICALENGINE_HPP 1 19 # pragma warning (push) 20 # pragma warning (disable: 4251) 46 static std::vector<real>& sqrttable();
54 -3 * (std::numeric_limits<real>::max_exponent < (1<<14) ?
55 std::numeric_limits<real>::max_exponent : (1<<14))
102 std::vector<real>::const_iterator
_Cnm;
103 std::vector<real>::const_iterator
_Snm;
108 coeff() : _Nx(-1) , _nmx(-1) , _mmx(-1) {}
125 const std::vector<real>&
S,
126 int N,
int nmx,
int mmx)
133 if (!(_Nx >= _nmx && _nmx >= _mmx && _mmx >= -1))
135 if (!(index(_nmx, _mmx) <
int(C.size()) &&
136 index(_nmx, _mmx) <
int(S.size()) + (_Nx + 1)))
153 const std::vector<real>&
S,
163 if (!(index(_nmx, _mmx) <
int(C.size()) &&
164 index(_nmx, _mmx) <
int(S.size()) + (_Nx + 1)))
171 int N()
const {
return _Nx; }
175 int nmx()
const {
return _nmx; }
179 int mmx()
const {
return _mmx; }
188 {
return m * _Nx - m * (m - 1) / 2 + n; }
214 {
return m > _mmx || n > _nmx ? 0 : *(_Cnm + k) * f; }
226 {
return m > _mmx || n > _nmx ? 0 : *(_Snm + (k - (_Nx + 1))) * f; }
237 {
return (M + 1) * (2 * N - M + 2) / 2; }
248 {
return Csize(N, M) - (N + 1); }
271 static void readcoeffs(std::istream&
stream,
int&
N,
int&
M,
272 std::vector<real>&
C, std::vector<real>&
S);
304 template<
bool gradp, normalization norm,
int L>
306 real
x, real
y, real
z, real
a,
307 real& gradx, real& grady, real& gradz);
332 template<
bool gradp, normalization norm,
int L>
334 real
p, real z, real a);
354 static void RootTable(
int N);
366 std::vector<real> temp(0);
367 sqrttable().swap(temp);
373 #if defined(_MSC_VER) 374 # pragma warning (pop) 377 #endif // GEOGRAPHICLIB_SPHERICALENGINE_HPP
Matrix< RealScalar, Dynamic, Dynamic > M
#define GEOGRAPHICLIB_EXPORT
The evaluation engine for SphericalHarmonic.
Math::real Cv(int k, int n, int m, real f) const
static int Ssize(int N, int M)
coeff(const std::vector< real > &C, const std::vector< real > &S, int N)
std::vector< real >::const_iterator _Cnm
std::vector< real >::const_iterator _Snm
static void RootTable(int N)
Math::real Sv(int k, int n, int m, real f) const
Package up coefficients for SphericalEngine.
coeff(const std::vector< real > &C, const std::vector< real > &S, int N, int nmx, int mmx)
Point2(* f)(const Point3 &, OptionalJacobian< 2, 3 >)
int index(int n, int m) const
Namespace for GeographicLib.
Matrix< Scalar, Dynamic, Dynamic > C
Spherical harmonic sums for a circle.
Math::real Sv(int k) const
Exception handling for GeographicLib.
Header for GeographicLib::Constants class.
static int Csize(int N, int M)
Jet< T, N > sqrt(const Jet< T, N > &f)
Math::real Cv(int k) const
Jet< T, N > pow(const Jet< T, N > &f, double g)
static void ClearRootTable()
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy x