htslib.kbitset

Undocumented in source.

Members

Functions

KBS_ELT
auto KBS_ELT(T i)
Undocumented in source. Be warned that the author may not have intended to support it.
KBS_MASK
auto KBS_MASK(T i)
Undocumented in source. Be warned that the author may not have intended to support it.
kbs_clear
void kbs_clear(kbitset_t* bs)

Reset the bit set to empty.

kbs_delete
void kbs_delete(kbitset_t* bs, int i)

Remove an element from the bit set.

kbs_destroy
void kbs_destroy(kbitset_t* bs)

Destroy a bit set.

kbs_exists
int kbs_exists(const(kbitset_t)* bs, int i)

Test whether the bit set contains the element.

kbs_init
kbitset_t* kbs_init(size_t ni)

Initialise an empty bit set capable of holding ni integers, 0 <= i < ni.

kbs_init2
kbitset_t* kbs_init2(size_t ni, int fill)

Initialise a bit set capable of holding ni integers, 0 <= i < ni. The set returned is empty if fill == 0, or all of [0,ni) otherwise. bn is always non-zero (a fact used by kbs_next()).

kbs_insert
void kbs_insert(kbitset_t* bs, int i)

Insert an element into the bit set.

kbs_insert_all
void kbs_insert_all(kbitset_t* bs)

Reset the bit set to all of [0,ni).

kbs_last_mask
c_ulong kbs_last_mask(size_t ni)

(For internal use only.) Returns a mask (like 00011111) showing which bits are in use in the last slot (for the given ni) set.

kbs_next
int kbs_next(const(kbitset_t)* bs, kbitset_iter_t* itr)

Return the next element contained in the bit set, or -1 if there are no more.

kbs_resize
int kbs_resize(kbitset_t** bsp, size_t ni_new)

Resize an existing bit set to be capable of holding ni_new integers. Returns negative on error.

kbs_resize2
int kbs_resize2(kbitset_t** bsp, size_t ni_new, int fill)

Resize an existing bit set to be capable of holding ni_new integers. Elements in [ni_old,ni_new) are added to the set if fill != 0. Need to clear excess bits when fill!=0 or n_new<n; always is simpler.

kbs_start
void kbs_start(kbitset_iter_t* itr)

Initialise or reset a bit set iterator.

Manifest constants

KBS_ELTBITS
enum KBS_ELTBITS;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.

Structs

kbitset_iter_t
struct kbitset_iter_t
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
kbitset_t
struct kbitset_t
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.

Meta