dotnet/NETGeographicLib/Accumulator.cpp
Go to the documentation of this file.
1 
11 #include "stdafx.h"
13 #include "Accumulator.h"
14 #include "NETGeographicLib.h"
15 
16 using namespace NETGeographicLib;
17 
18 //*****************************************************************************
20 {
21  if ( m_pAccumulator != NULL )
22  {
23  delete m_pAccumulator;
24  m_pAccumulator = NULL;
25  }
26 }
27 
28 //*****************************************************************************
30 {
31  try
32  {
34  }
35  catch ( std::bad_alloc )
36  {
37  throw gcnew GeographicErr("Failed to allocate memory for a GeogrpicLib::Accumulator");
38  }
39 }
40 
41 //*****************************************************************************
42 void Accumulator::Assign( double a )
43 {
44  m_pAccumulator->operator=( a);
45 }
46 
47 //*****************************************************************************
49 {
50  return m_pAccumulator->operator()();
51 }
52 
53 //*****************************************************************************
54 void Accumulator::Sum( double a )
55 {
56  m_pAccumulator->operator+=( a );
57 }
58 
59 //*****************************************************************************
61 {
62  m_pAccumulator->operator*=( i );
63 }
64 
65 //*****************************************************************************
67 {
68  return lhs->m_pAccumulator->operator==( a );
69 }
70 
71 //*****************************************************************************
73 {
74  return lhs->m_pAccumulator->operator!=( a );
75 }
76 
77 //*****************************************************************************
79 {
80  return lhs->m_pAccumulator->operator<( a );
81 }
82 
83 //*****************************************************************************
85 {
86  return lhs->m_pAccumulator->operator<=( a );
87 }
88 
89 //*****************************************************************************
91 {
92  return lhs->m_pAccumulator->operator>( a );
93 }
94 
95 //*****************************************************************************
97 {
98  return lhs->m_pAccumulator->operator>=( a );
99 }
NETGeographicLib::Accumulator::Result
double Result()
Returns the accumulated value.
Definition: dotnet/NETGeographicLib/Accumulator.cpp:48
NETGeographicLib::Accumulator::operator>
static bool operator>(Accumulator^ lhs, double a)
Greater than operator.
Definition: dotnet/NETGeographicLib/Accumulator.cpp:90
NETGeographicLib::Accumulator::operator<=
static bool operator<=(Accumulator^ lhs, double a)
Less than or equal to operator.
Definition: dotnet/NETGeographicLib/Accumulator.cpp:84
NETGeographicLib::Accumulator
.NET wrapper for GeographicLib::Accumulator.
Definition: Accumulator.h:44
NETGeographicLib::Accumulator::operator>=
static bool operator>=(Accumulator^ lhs, double a)
Greater than or equal to operator.
Definition: dotnet/NETGeographicLib/Accumulator.cpp:96
NETGeographicLib::GeographicErr
Exception class for NETGeographicLib.
Definition: NETGeographicLib.h:132
NETGeographicLib::Accumulator::Multiply
void Multiply(int i)
Multiplication by an integer.
Definition: dotnet/NETGeographicLib/Accumulator.cpp:60
NETGeographicLib::Accumulator::operator<
static bool operator<(Accumulator^ lhs, double a)
Less than operator.
Definition: dotnet/NETGeographicLib/Accumulator.cpp:78
NETGeographicLib::Accumulator::Assign
void Assign(double a)
Assigns a value to an accumulator.
Definition: dotnet/NETGeographicLib/Accumulator.cpp:42
Accumulator.hpp
Header for GeographicLib::Accumulator class.
GeographicLib::Accumulator< double >
stdafx.h
NETGeographicLib::Accumulator::operator!=
static bool operator!=(Accumulator^ lhs, double a)
Inequality operator.
Definition: dotnet/NETGeographicLib/Accumulator.cpp:72
NETGeographicLib.h
Header for NETGeographicLib::NETGeographicLib objects.
a
ArrayXXi a
Definition: Array_initializer_list_23_cxx11.cpp:1
NETGeographicLib::Accumulator::operator==
static bool operator==(Accumulator^ lhs, double a)
Equality operator.
Definition: dotnet/NETGeographicLib/Accumulator.cpp:66
NETGeographicLib::Accumulator::Sum
void Sum(double a)
Adds a value to the accumulator.
Definition: dotnet/NETGeographicLib/Accumulator.cpp:54
Accumulator.h
Header for NETGeographicLib::Accumulator class.
NULL
#define NULL
Definition: ccolamd.c:609
NETGeographicLib::Accumulator::m_pAccumulator
GeographicLib::Accumulator< double > * m_pAccumulator
Definition: Accumulator.h:48
NETGeographicLib
Definition: Accumulator.h:13
i
int i
Definition: BiCGSTAB_step_by_step.cpp:9
NETGeographicLib::Accumulator::Accumulator
Accumulator(void)
Constructor.
Definition: dotnet/NETGeographicLib/Accumulator.cpp:29


gtsam
Author(s):
autogenerated on Sun Dec 22 2024 04:11:05