parQHV
Compute HyperVolumes using threads
 All Data Structures Files Functions Variables Macros
subsets.h File Reference

This returns iterators for diferent type. WARNING, these objects are singleton, so new overwrites existing iterator;. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define Rbit(N)   ((N) & -(N))
 
#define Rpop(N)   ((N) & ~-(N))
 
#define fastLog2(L)   __builtin_ctz(L)
 

Functions

void newSets (unsigned int t)
 
int hasNextSet (void)
 
unsigned int nextSet (void)
 

Detailed Description

This returns iterators for diferent type. WARNING, these objects are singleton, so new overwrites existing iterator;.

Author
Luis Russo <lsr-ThinkPad-X201>
Date
Tue Nov 29 11:53:34 2011

Definition in file subsets.h.

Macro Definition Documentation

#define fastLog2 (   L)    __builtin_ctz(L)

Bit function

Parameters
lThe integer, should contain only 1 bit
Returns
Determine index of Rightmost bit

Definition at line 98 of file subsets.h.

#define Rbit (   N)    ((N) & -(N))

The next bit manipulating ops are usefull in other files

Parameters
NThe original number
Returns
The rightmost 1 bit

Definition at line 81 of file subsets.h.

#define Rpop (   N)    ((N) & ~-(N))
Parameters
NThe original number
Returns
N without the rightmost 1 bit

Definition at line 88 of file subsets.h.

Function Documentation

int hasNextSet ( void  )
Parameters
itThe iterator
Returns
True if there are more subsets

Definition at line 72 of file subsets.c.

void newSets ( unsigned int  t)

WARNING: This class is singleton. This function overwrites previous call.

Parameters
tThe type *
Returns
A proper subser iterator

Definition at line 57 of file subsets.c.

unsigned int nextSet ( void  )
Parameters
itThe iterator
Returns
The next subset

Definition at line 77 of file subsets.c.