|
__init__(self,
width=None)
x.__init__(...) initializes x; see help(type(x)) for signature |
|
|
|
|
|
|
|
|
|
__setitem__(self,
index,
value) |
|
|
|
|
|
|
|
get(self,
index,
toIndex=None)
Get bit by index.
Arguments include index of bit, and optional toIndex that return a slice as a BitSet. |
|
|
|
set(self,
index,
value=1)
Set bit by index.
Optional argument value is the bit state of 1(True) or 0(False). Default:1 |
|
|
|
fill(self,
index=None,
toIndex=None)
Set the bit. If no argument provided, all bits are set.
Optional argument index is bit index to set, and toIndex to set a range of bits. |
|
|
|
clear(self,
index=None,
toIndex=None)
Clear the bit. If no argument provided, all bits are cleared.
Optional argument index is bit index to clear, and toIndex to clear a range of bits. |
|
|
|
flip(self,
index,
toIndex=None)
Flip the state of the bit.
Argument index is the bit index to flip, and toIndex to flip a range of bits. |
|
|
|
cardinality(self)
Return the count of bit set. |
|
|
|
intersects(self,
bitset)
Check if set bits in this BitSet are also set in the bitset argument.
Return True if bitsets intersect, otherwise return False. |
|
|
|
andSet(self,
bitset)
BitSet and BitSet. |
|
|
|
orSet(self,
bitset)
BitSet or BitSet. |
|
|
|
xorSet(self,
bitset)
BitSet xor BitSet. |
|
|
|
resize(self,
width)
Resize the BitSet to width argument. |
|
|
|
size(self)
Return bits used by BitSet storage array. |
|
|
|
isEmpty(self)
Check whether any bit is set.
Return True if none set, otherwise return False. |
|
|
|
clone(self)
Return a copy of the BitSet. |
|
|
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__setattr__ ,
__sizeof__ ,
__subclasshook__
|