bx.bitset module
Compact mutable sequences of bits (vectors of 0s and 1s) supporting various
boolean operations, and a “binned” variation which stores long runs of
identical bits compactly.
Because the binned implementation avoids a lot of memory allocation and access
when working with either small subregions of the total interval or setting /
testing spans larger than the bin size, it can be much faster.
-
class bx.bitset.BinnedBitSet
Bases: object
-
bin_size
-
clear(index)
-
count_range(start, count)
-
iand(other)
-
invert()
-
ior(other)
-
next_clear(start)
-
next_set(start)
-
set(index)
-
set_range(start, count)
-
size
-
class bx.bitset.BitSet
Bases: object
-
clear(index)
-
clone()
-
count_range(start=0, count=None)
-
get(index)
-
iand(other)
-
invert()
-
ior(other)
-
ixor(other)
-
next_clear(start, end=None)
-
next_set(start, end=None)
-
set(index)
-
set_range(start, count)
-
size