Implementation of an arbitrary-size bitset.
Prototypes | |
LALBitset * | XLALBitsetCreate (void) |
Create a bitset. More... | |
void | XLALBitsetDestroy (LALBitset *bs) |
Destroy a bitset and its elements. More... | |
int | XLALBitsetClear (LALBitset *bs) |
Clear a bitset. More... | |
int | XLALBitsetSet (LALBitset *bs, const UINT8 idx, const BOOLEAN is_set) |
Set/unset a bit in the bitset. More... | |
int | XLALBitsetGet (const LALBitset *bs, const UINT8 idx, BOOLEAN *is_set) |
Get whether a bit in the bitset is set. More... | |
LALBitset* XLALBitsetCreate | ( | void | ) |
Create a bitset.
Definition at line 51 of file LALBitset.c.
void XLALBitsetDestroy | ( | LALBitset * | bs | ) |
Destroy a bitset and its elements.
[in] | bs | Pointer to bitset |
Definition at line 68 of file LALBitset.c.
int XLALBitsetClear | ( | LALBitset * | bs | ) |
Set/unset a bit in the bitset.
[in] | bs | Pointer to bitset |
[in] | idx | Index of bit in set |
[in] | is_set | Whether bit is set |
Definition at line 93 of file LALBitset.c.
Get whether a bit in the bitset is set.
[in] | bs | Pointer to bitset |
[in] | idx | Index of bit in set |
[out] | is_set | Whether bit is set |
Definition at line 131 of file LALBitset.c.