parQHV
Compute HyperVolumes using threads
Main Page
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Macros
subsets.h
Go to the documentation of this file.
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
37
#ifndef SUBSETS_H
38
#define SUBSETS_H
39
40
/*** typedefs(not structures) and defined constants *******/
41
42
/*** enums ************************************************/
43
44
/*** structures declarations (and typedefs of )************/
45
46
/*** global variables defined in .c file ******************/
47
48
/*** declarations of public functions *********************/
49
58
void
newSets
(
unsigned
int
t);
59
65
int
hasNextSet
(
void
);
66
72
unsigned
int
nextSet
(
void
);
73
81
#define Rbit(N) ((N) & -(N))
82
88
#define Rpop(N) ((N) & ~-(N))
89
98
#define fastLog2(L) __builtin_ctz(L)
99
/* static sureInline(int) fastLog2(unsigned int l) */
100
/* { */
101
/* float v; /\* find int(log2(v)), where v > 0.0 && finite(v) && isnormal(v) *\/ */
102
/* int c; /\* 32-bit int c gets the result; *\/ */
103
104
/* v = l; */
105
/* c = *((int*)&v); */
106
/* c = (c >> 23) - 127; */
107
108
/* return c; */
109
/* } */
110
111
/* static int bits(int i) */
112
/* { */
113
/* int j; */
114
115
/* j = 0; */
116
/* while(i > 0) */
117
/* { */
118
/* j++; */
119
/* i = Rpop(i); */
120
/* } */
121
122
/* return j; */
123
/* } */
124
125
/*** inline functions *************************************/
126
127
#endif
/* SUBSETS_H */
newSets
void newSets(unsigned int t)
Definition:
subsets.c:57
nextSet
unsigned int nextSet(void)
Definition:
subsets.c:77
hasNextSet
int hasNextSet(void)
Definition:
subsets.c:72
subsets.h
Generated on Fri Sep 23 2016 11:31:07 for parQHV by
1.8.8