dotnet/NETGeographicLib/EllipticFunction.cpp
Go to the documentation of this file.
1 
11 #include "stdafx.h"
13 #include "EllipticFunction.h"
14 #include "NETGeographicLib.h"
15 
16 using namespace NETGeographicLib;
17 
18 const char BADALLOC[] = "Failed to allocate memory for the GeographicLib::EllipticFunction.";
19 
20 //*****************************************************************************
21 EllipticFunction::EllipticFunction(double k2, double alpha2)
22 {
23  try
24  {
26  }
27  catch ( std::bad_alloc )
28  {
29  throw gcnew GeographicErr( BADALLOC );
30  }
31 }
32 
33 //*****************************************************************************
34 EllipticFunction::EllipticFunction(double k2, double alpha2, double kp2, double alphap2)
35 {
36  try
37  {
38  m_pEllipticFunction = new GeographicLib::EllipticFunction( k2, alpha2, kp2, alphap2 );
39  }
40  catch ( std::bad_alloc err )
41  {
42  throw gcnew GeographicErr( BADALLOC );
43  }
44 }
45 
46 //*****************************************************************************
48 {
49  if ( m_pEllipticFunction != NULL )
50  {
51  delete m_pEllipticFunction;
53  }
54 }
55 
56 //*****************************************************************************
57 void EllipticFunction::Reset(double k2, double alpha2 )
58 {
59  m_pEllipticFunction->Reset( k2, alpha2 );
60 }
61 
62 //*****************************************************************************
63 void EllipticFunction::Reset(double k2, double alpha2, double kp2, double alphap2)
64 {
65  m_pEllipticFunction->Reset( k2, alpha2, kp2, alphap2 );
66 }
67 
68 //*****************************************************************************
70 {
71  return m_pEllipticFunction->K();
72 }
73 
74 //*****************************************************************************
76 {
77  return m_pEllipticFunction->E();
78 }
79 
80 //*****************************************************************************
82 {
83  return m_pEllipticFunction->D();
84 }
85 
86 //*****************************************************************************
88 {
89  return m_pEllipticFunction->KE();
90 }
91 
92 //*****************************************************************************
94 {
95  return m_pEllipticFunction->Pi();
96 }
97 
98 //*****************************************************************************
100 {
101  return m_pEllipticFunction->G();
102 }
103 
104 //*****************************************************************************
106 {
107  return m_pEllipticFunction->H();
108 }
109 
110 //*****************************************************************************
111 double EllipticFunction::F(double phi)
112 {
113  return m_pEllipticFunction->F( phi );
114 }
115 
116 //*****************************************************************************
117 double EllipticFunction::E(double phi)
118 {
119  return m_pEllipticFunction->E( phi );
120 }
121 
122 //*****************************************************************************
123 double EllipticFunction::Ed(double ang)
124 {
125  return m_pEllipticFunction->Ed(ang);
126 }
127 
128 //*****************************************************************************
129 double EllipticFunction::Einv(double x)
130 {
131  return m_pEllipticFunction->Einv(x);
132 }
133 
134 //*****************************************************************************
135 double EllipticFunction::Pi(double phi)
136 {
137  return m_pEllipticFunction->Pi(phi);
138 }
139 
140 //*****************************************************************************
141 double EllipticFunction::D(double phi)
142 {
143  return m_pEllipticFunction->D(phi);
144 }
145 
146 //*****************************************************************************
147 double EllipticFunction::G(double phi)
148 {
149  return m_pEllipticFunction->G(phi);
150 }
151 
152 //*****************************************************************************
153 double EllipticFunction::H(double phi)
154 {
155  return m_pEllipticFunction->H(phi);
156 }
157 
158 //*****************************************************************************
159 double EllipticFunction::F(double sn, double cn, double dn)
160 {
161  return m_pEllipticFunction->F( sn, cn, dn );
162 }
163 
164 //*****************************************************************************
165 double EllipticFunction::E(double sn, double cn, double dn)
166 {
167  return m_pEllipticFunction->E( sn, cn, dn );
168 }
169 
170 //*****************************************************************************
171 double EllipticFunction::Pi(double sn, double cn, double dn)
172 {
173  return m_pEllipticFunction->Pi( sn, cn, dn );
174 }
175 
176 //*****************************************************************************
177 double EllipticFunction::D(double sn, double cn, double dn)
178 {
179  return m_pEllipticFunction->D( sn, cn, dn );
180 }
181 
182 //*****************************************************************************
183 double EllipticFunction::G(double sn, double cn, double dn)
184 {
185  return m_pEllipticFunction->G( sn, cn, dn );
186 }
187 
188 //*****************************************************************************
189 double EllipticFunction::H(double sn, double cn, double dn)
190 {
191  return m_pEllipticFunction->H( sn, cn, dn );
192 }
193 
194 //*****************************************************************************
195 double EllipticFunction::deltaF(double sn, double cn, double dn)
196 {
197  return m_pEllipticFunction->deltaF( sn, cn, dn );
198 }
199 
200 //*****************************************************************************
201 double EllipticFunction::deltaE(double sn, double cn, double dn)
202 {
203  return m_pEllipticFunction->deltaE( sn, cn, dn );
204 }
205 
206 //*****************************************************************************
207 double EllipticFunction::deltaEinv(double stau, double ctau)
208 {
209  return m_pEllipticFunction->deltaEinv( stau, ctau );
210 }
211 
212 //*****************************************************************************
213 double EllipticFunction::deltaPi(double sn, double cn, double dn)
214 {
215  return m_pEllipticFunction->deltaPi( sn, cn, dn );
216 }
217 
218 //*****************************************************************************
219 double EllipticFunction::deltaD(double sn, double cn, double dn)
220 {
221  return m_pEllipticFunction->deltaD( sn, cn, dn );
222 }
223 
224 //*****************************************************************************
225 double EllipticFunction::deltaG(double sn, double cn, double dn)
226 {
227  return m_pEllipticFunction->deltaG( sn, cn, dn );
228 }
229 
230 //*****************************************************************************
231 double EllipticFunction::deltaH(double sn, double cn, double dn)
232 {
233  return m_pEllipticFunction->deltaH( sn, cn, dn );
234 }
235 
236 //*****************************************************************************
238  [System::Runtime::InteropServices::Out] double% sn,
239  [System::Runtime::InteropServices::Out] double% cn,
240  [System::Runtime::InteropServices::Out] double% dn)
241 {
242  double lsn, lcn, ldn;
243  m_pEllipticFunction->sncndn( x, lsn, lcn, ldn );
244  sn = lsn;
245  cn = lcn;
246  dn = ldn;
247 }
248 
249 //*****************************************************************************
250 double EllipticFunction::Delta(double sn, double cn)
251 {
252  return m_pEllipticFunction->Delta( sn, cn );
253 }
254 
255 //*****************************************************************************
256 double EllipticFunction::RF(double x, double y, double z)
257 {
258  return GeographicLib::EllipticFunction::RF( x, y, z );
259 }
260 
261 //*****************************************************************************
262 double EllipticFunction::RF(double x, double y)
263 {
265 }
266 
267 //*****************************************************************************
268 double EllipticFunction::RC(double x, double y)
269 {
271 }
272 
273 //*****************************************************************************
274 double EllipticFunction::RG(double x, double y, double z)
275 {
276  return GeographicLib::EllipticFunction::RG( x, y, z );
277 }
278 
279 //*****************************************************************************
280 double EllipticFunction::RG(double x, double y)
281 {
283 }
284 
285 //*****************************************************************************
286 double EllipticFunction::RJ(double x, double y, double z, double p)
287 {
288  return GeographicLib::EllipticFunction::RJ( x, y, z, p );
289 }
290 
291 //*****************************************************************************
292 double EllipticFunction::RD(double x, double y, double z)
293 {
294  return GeographicLib::EllipticFunction::RD( x, y, z );
295 }
296 
297 //*****************************************************************************
299 { return m_pEllipticFunction->k2(); }
300 
301 //*****************************************************************************
303 { return m_pEllipticFunction->kp2(); }
304 
305 //*****************************************************************************
307 { return m_pEllipticFunction->alpha2(); }
308 
309 //*****************************************************************************
311 { return m_pEllipticFunction->alpha2(); }
static double RJ(double x, double y, double z, double p)
void sncndn(real x, real &sn, real &cn, real &dn) const
Header for NETGeographicLib::NETGeographicLib objects.
Scalar * y
void Reset(real k2=0, real alpha2=0)
Exception class for NETGeographicLib.
Math::real deltaPi(real sn, real cn, real dn) const
Math::real deltaE(real sn, real cn, real dn) const
static double RF(double x, double y, double z)
Elliptic integrals and functions.
static real RG(real x, real y, real z)
static double RD(double x, double y, double z)
Header for NETGeographicLib::EllipticFunction class.
static real RF(real x, real y, real z)
static real RC(real x, real y)
static double RG(double x, double y, double z)
GeographicLib::EllipticFunction * m_pEllipticFunction
Header for GeographicLib::EllipticFunction class.
#define NULL
Definition: ccolamd.c:609
Math::real deltaH(real sn, real cn, real dn) const
Math::real deltaG(real sn, real cn, real dn) const
Math::real Delta(real sn, real cn) const
float * p
Math::real deltaD(real sn, real cn, real dn) const
static real RD(real x, real y, real z)
Container::iterator get(Container &c, Position position)
Math::real deltaEinv(real stau, real ctau) const
static real RJ(real x, real y, real z, real p)
void sncndn(double x, [System::Runtime::InteropServices::Out] double% sn, [System::Runtime::InteropServices::Out] double% cn, [System::Runtime::InteropServices::Out] double% dn)
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
Math::real deltaF(real sn, real cn, real dn) const


gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:34:12