dotnet/examples/ManagedCPP/example-SphericalHarmonic2.cpp
Go to the documentation of this file.
1 using namespace System;
2 using namespace NETGeographicLib;
3 
5 {
6  try
7  {
8  int N = 3, N1 = 2, N2 = 1; // The maximum degrees
9  array<double>^ ca = { 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 }; // cosine coefficients
10  array<double>^ sa = { 6, 5, 4, 3, 2, 1 }; // sine coefficients
11  array<double>^ cb = { 1, 2, 3, 4, 5, 6 };
12  array<double>^ sb = { 3, 2, 1 };
13  array<double>^ cc = { 2, 1 };
14  array<double>^ S2 = { 0 };
15  double a = 1;
17  ca, sa, N, N, N, cb, sb, N1, N1, N1,
18  cc, S2, N2, N2, 0, a,
19  SphericalHarmonic2::Normalization::SCHMIDT);
20  double tau1 = 0.1, tau2 = 0.05, x = 2, y = 3, z = 1;
21  double v, vx, vy, vz;
22  v = h->HarmonicSum(tau1, tau2, x, y, z, vx, vy, vz);
23  Console::WriteLine(String::Format("{0} {1} {2} {3}", v, vx, vy, vz));
24  }
25  catch (GeographicErr^ e) {
26  Console::WriteLine(String::Format("Caught exception: {0}", e->Message));
27  return -1;
28  }
29  return 0;
30 }
double HarmonicSum(double tau1, double tau2, double x, double y, double z)
.NET wrapper for GeographicLib::SphericalHarmonic2.
Scalar * y
Symmetric< 2 > S2
Definition: testGroup.cpp:80
Exception class for NETGeographicLib.
ArrayXcf v
Definition: Cwise_arg.cpp:1
Definition: numpy.h:543
int main(array< System::String^>^)
#define N
Definition: gksort.c:12
Array33i a
StridedVectorType vy(make_vector(y,*n, std::abs(*incy)))
Array< double, 1, 3 > e(1./3., 0.5, 2.)
const double h
StridedVectorType vx(make_vector(x,*n, std::abs(*incx)))
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


gtsam
Author(s):
autogenerated on Sat May 8 2021 02:42:02