sbitset.h: bit set (bit array)


Functions allowing bit random access storage and bit counting. Bit counting is optimized so, instead of per-call 'poppulation count', it takes O(1) for the computation, as a record of bit set/clear is kept.

 sb_alloc  sb_capacity  sb_dup  sb_popcount  sb_reset  sb_test 
 sb_alloca  sb_clear  sb_free  sb_reserve  sb_set 


srt_bitset *sb_alloc(size_t initial_num_elems_reserve)



srt_bitset *sb_alloca(size_t initial_num_elems_reserve)



size_t sb_capacity(const srt_bitset *b)



void sb_clear(srt_bitset *b)



srt_bitset *sb_dup(const srt_bitset *src)



srt_bitset *sb_free(srt_bitset **b, ...)



size_t sb_popcount(const srt_bitset *b)



size_t sb_reserve(srt_bitset **b, size_t max_elems)



void sb_reset(srt_bitset **b, size_t nth)



void sb_set(srt_bitset **b, size_t nth)



int sb_test(const srt_bitset *b, size_t nth)