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 
QhullRidge – Qhull&#39;s ridge structure, ridgeT, as a C++ class.
Definition: Coordinates.cpp:21
void operator()(double v)
Sum of the elements in a container.
void operator()(double v)
Sum of squares of the elements in a container.
list v
Definition: obb.py:45
void operator()(double v)


hpp-fcl
Author(s):
autogenerated on Fri Jun 2 2023 02:39:01