exQHV
Compute Exclusive HyperVolumes sequentially
 All Data Structures Files Functions Variables Macros
quickhvolume.h
1 /*
2  *
3  * Copyright (c) Year(s), 2013, Luis M. S. Russo and Alexandre
4  * P. Francisco / KDBIO / INESC-ID, <qhv@kdbio.inesc-id.pt>
5  *
6  * Any published media that is related with to use of the distributed
7  * software, or derived software, must contain a reference to "Extending
8  * quick hypervolume. Luís M. S. Russo, Alexandre P. Francisco:
9  * J. Heuristics 22(3): 245-271 (2016)".
10  *
11  * Permission to use, copy, modify, and/or distribute this software for
12  * any purpose with or without fee is hereby granted, provided that the
13  * above copyright notice and this permission notice appear in all
14  * copies.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
17  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
18  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
19  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
20  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
21  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
22  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
23  * PERFORMANCE OF THIS SOFTWARE.
24  *
25  */
26 
31 #ifndef QUICKVOLUME_H
32 #define QUICKVOLUME_H
33 
34 #include "point.h"
35 
37 #ifndef COUNT
38 #if D == 2
39 #define N 1
40 #define HSOL N-N
41 #elif D == 3
42 #define N 8 // Never Set larger than 31 for IEC
43 #define HSOL N-0
44 #elif D == 4
45 #define N 8
46 #define HSOL N-0
47 #elif D == 5
48 #define N 8
49 #define HSOL N-0
50 #elif D == 6
51 #define N 9
52 #define HSOL N-0
53 #elif D == 7
54 #define N 9
55 #define HSOL N-0
56 #elif D == 8
57 #define N 10
58 #define HSOL N-0
59 #elif D == 9
60 #define N 10
61 #define HSOL N-0
62 #elif D == 10
63 #define N 10
64 #define HSOL N-0
65 #elif D == 11
66 #define N 10
67 #define HSOL N-0
68 #elif D == 12
69 #define N 10
70 #define HSOL N-0
71 #elif D == 13
72 #define N 12
73 #define HSOL N-0
74 #elif D == 14
75 #define N 10
76 #define HSOL N-0
77 #elif D == 15
78 #define N 10
79 #define HSOL N-0
80 #else /* D == 16 */
81 #error Wrong D
82 #endif /* D == 9 */
83 #else /* COUNT undef */
84 #define N 1
85 #define HSOL N-1
86 #endif /* COUNT undef */
87 
88 
89 /*** typedefs(not structures) and defined constants *******/
90 
91 /*** enums ************************************************/
92 
93 /*** structures declarations (and typedefs of )************/
94 
95 /*** global variables defined in .c file ******************/
96 
97 /*** declarations of public functions *********************/
98 
106 double quickExHVolume(int n, point* PS, double* exHV);
107 
108 /*** inline functions *************************************/
109 
110 #endif /* QUICKVOLUME_H */
Simple point interface. Contains simple point manipulation functions.
Point is an array of coordinates, in a struct for simple and fast copy.
Definition: point.h:58