21#include <gsl/gsl_rng.h>
22#include <lal/LALStdio.h>
23#include <lal/LALBitset.h>
34 gsl_rng *
r = gsl_rng_alloc( gsl_rng_mt19937 );
38 bits[n] = ( gsl_rng_uniform(
r ) > 0.44 );
39 nbits += bits[n] ? 1 : 0;
43 const UINT8 n0 = gsl_rng_get(
r ) % 65536;
void LALCheckMemoryLeaks(void)
LALBitset * XLALBitsetCreate(void)
Create a bitset.
int XLALBitsetClear(LALBitset *bs)
Clear a bitset.
void XLALBitsetDestroy(LALBitset *bs)
Destroy a bitset and its elements.
int XLALBitsetGet(const LALBitset *bs, const UINT8 idx, BOOLEAN *is_set)
Get whether a bit in the bitset is set.
int XLALBitsetSet(LALBitset *bs, const UINT8 idx, const BOOLEAN is_set)
Set/unset a bit in the bitset.
unsigned char BOOLEAN
Boolean logical type, see Headers LAL(Atomic)Datatypes.h for more details.
#define XLAL_NUM_ELEM(x)
MACRO which gives the number of elements in a fixed-size array.
uint64_t UINT8
Eight-byte unsigned integer; on some platforms this is equivalent to unsigned long int instead.
#define XLAL_INIT_DECL(var,...)
C99 MACRO to declare and zero-initialize a variable, use as "type XLAL_INIT_DECL(var);".
#define XLAL_CHECK_MAIN(assertion,...)
Macro to test an assertion and invoke a failure if it is not true in a C main() routine.
@ XLAL_SUCCESS
Success return value (not an error number)
@ XLAL_EFUNC
Internal function call failed bit: "or" this with existing error number.
@ XLAL_EFAILED
Generic failure.