functionObjects.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (c) 2008-2015 C.B. Barber. All rights reserved.
4 ** $Id: //main/2015/qhull/src/libqhullcpp/functionObjects.h#1 $$Change: 1981 $
5 ** $DateTime: 2015/09/28 20:26:32 $$Author: bbarber $
6 **
7 ****************************************************************************/
8 
9 #ifndef QHFUNCTIONOBJECTS_H
10 #define QHFUNCTIONOBJECTS_H
11 
12 #include <stdlib.h>
13 #include <math.h>
14 
15 namespace orgQhull {
16 
17 #
18 
19  class AbsoluteSumOf;
22  class SumOf;
24  class SumSquaresOf;
25 
26 #
27 
28 class AbsoluteSumOf
30 {
31 private:
32  double sum;
33 public:
34  inline AbsoluteSumOf() : sum(0.0) {}
35  inline void operator()(double v) { sum += fabs(v); }
36  inline operator double() { return sum; }
37 };//AbsoluteSumOf
38 
40 class SumOf
41 {
42 private:
43  double sum;
44 public:
45  inline SumOf() : sum(0.0) {}
46  inline void operator()(double v) { sum += v; }
47  inline operator double() { return sum; }
48 };//SumOf
49 
50 
53 {
54 private:
55  double sum;
56 public:
57  inline SumSquaresOf() : sum(0.0) {}
58  inline void operator()(double v) { sum += v*v; }
59  inline operator double() { return sum; }
60 };//SumSquaresOf
61 
62 
63 }//orgQhull
64 
65 
66 #endif //QHFUNCTIONOBJECTS_H
67 
orgQhull::SumOf::sum
double sum
Definition: functionObjects.h:49
orgQhull
QhullRidge – Qhull's ridge structure, ridgeT, as a C++ class.
Definition: Coordinates.cpp:21
orgQhull::SumOf::SumOf
SumOf()
Definition: functionObjects.h:51
orgQhull::AbsoluteSumOf::AbsoluteSumOf
AbsoluteSumOf()
Definition: functionObjects.h:40
orgQhull::AbsoluteSumOf::operator()
void operator()(double v)
Definition: functionObjects.h:41
orgQhull::AbsoluteSumOf::sum
double sum
Definition: functionObjects.h:38
orgQhull::SumOf::operator()
void operator()(double v)
Definition: functionObjects.h:52
orgQhull::SumOf
Sum of the elements in a container.
Definition: functionObjects.h:46
orgQhull::SumSquaresOf::operator()
void operator()(double v)
Definition: functionObjects.h:64
orgQhull::SumSquaresOf::sum
double sum
Definition: functionObjects.h:61
orgQhull::SumSquaresOf::SumSquaresOf
SumSquaresOf()
Definition: functionObjects.h:63
orgQhull::SumSquaresOf
Sum of squares of the elements in a container.
Definition: functionObjects.h:58
obb.v
list v
Definition: obb.py:48


hpp-fcl
Author(s):
autogenerated on Fri Aug 2 2024 02:45:13