This returns iterators for diferent type. WARNING, these objects are singleton, so new overwrites existing iterator;.
More...
Go to the source code of this file.
|
#define | Rbit(N) ((N) & -(N)) |
|
#define | Rpop(N) ((N) & ~-(N)) |
|
#define | fastLog2(L) __builtin_ctz(L) |
|
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.
#define fastLog2 |
( |
|
L | ) |
__builtin_ctz(L) |
Bit function
- Parameters
-
l | The 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
-
- Returns
- The rightmost 1 bit
Definition at line 81 of file subsets.h.
#define Rpop |
( |
|
N | ) |
((N) & ~-(N)) |
- Parameters
-
- Returns
- N without the rightmost 1 bit
Definition at line 88 of file subsets.h.
- Parameters
-
- 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
-
- Returns
- A proper subser iterator
Definition at line 57 of file subsets.c.
unsigned int nextSet |
( |
void |
| ) |
|
- Parameters
-
- Returns
- The next subset
Definition at line 77 of file subsets.c.