LAL  7.5.0.1-b72065a

Detailed Description

Implementation of an arbitrary-size bitset.

Author
Karl Wette

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...
 

Function Documentation

◆ XLALBitsetCreate()

LALBitset* XLALBitsetCreate ( void  )

Create a bitset.

Definition at line 51 of file LALBitset.c.

◆ XLALBitsetDestroy()

void XLALBitsetDestroy ( LALBitset *  bs)

Destroy a bitset and its elements.

Parameters
[in]bsPointer to bitset

Definition at line 68 of file LALBitset.c.

◆ XLALBitsetClear()

int XLALBitsetClear ( LALBitset *  bs)

Clear a bitset.

Parameters
[in]bsPointer to bitset

Definition at line 78 of file LALBitset.c.

◆ XLALBitsetSet()

int XLALBitsetSet ( LALBitset *  bs,
const UINT8  idx,
const BOOLEAN  is_set 
)

Set/unset a bit in the bitset.

Parameters
[in]bsPointer to bitset
[in]idxIndex of bit in set
[in]is_setWhether bit is set

Definition at line 93 of file LALBitset.c.

◆ XLALBitsetGet()

int XLALBitsetGet ( const LALBitset *  bs,
const UINT8  idx,
BOOLEAN is_set 
)

Get whether a bit in the bitset is set.

Parameters
[in]bsPointer to bitset
[in]idxIndex of bit in set
[out]is_setWhether bit is set

Definition at line 131 of file LALBitset.c.