|
__init__(self,
*args,
**kwargs)
x.__init__(...) initializes x; see x.__class__.__doc__ for
signature |
source code
|
|
|
_setbit(self,
posn,
val)
Set the bit at the designated position to the value shown |
source code
|
|
|
_getbit(self,
posn)
Get the bit from the designated position |
source code
|
|
|
__xor__(self,
other)
Take a bitwise 'xor' of the bit vector on which the method is
invoked with the argument bit vector. |
source code
|
|
|
__and__(self,
other)
Take a bitwise 'and' of the bit vector on which the method is
invoked with the argument bit vector. |
source code
|
|
|
__or__(self,
other)
Take a bitwise 'or' of the bit vector on which the method is
invoked with the argument bit vector. |
source code
|
|
|
__invert__(self)
Invert the bits in the bit vector on which the method is invoked
and return the result as a new bit vector. |
source code
|
|
|
__add__(self,
other)
Concatenate the argument bit vector with the bit vector on which
the method is invoked. |
source code
|
|
|
_getsize(self)
Return the number of bits in a bit vector. |
source code
|
|
|
|
|
read_bits_from_fileobject(self,
fp)
This function is meant to read a bit string from a file like
object. |
source code
|
|
|
|
|
divide_into_two(self)
Divides an even-sized bit vector into two and returns the two
halves as a list of two bit vectors. |
source code
|
|
|
permute(self,
permute_list)
Permute a bit vector according to the indices shown in the second
argument list. |
source code
|
|
|
unpermute(self,
permute_list)
Unpermute the bit vector according to the permutation list
supplied as the second argument. |
source code
|
|
|
write_to_file(self,
file_out)
(Contributed by Joe Davidson) Write the bitvector to the file
object file_out. |
source code
|
|
|
close_file_object(self)
For closing a file object that was used for reading the bits into
one or more BitVector objects. |
source code
|
|
|
intValue(self)
Return the integer value of a bitvector |
source code
|
|
|
__lshift__(self,
n)
For an in-place left circular shift by n bit positions |
source code
|
|
|
__rshift__(self,
n)
For an in-place right circular shift by n bit positions. |
source code
|
|
|
circular_rotate_left_by_one(self)
For a one-bit in-place left circular shift |
source code
|
|
|
circular_rotate_right_by_one(self)
For a one-bit in-place right circular shift |
source code
|
|
|
|
|
|
|
__getitem__(self,
posn)
Get the bit from the designated position |
source code
|
|
|
__setitem__(self,
posn,
val)
Set the bit at the designated position to the value shown |
source code
|
|
|
__getslice__(self,
i,
j)
Allow slicing with [i:j], [:], etc. |
source code
|
|
|
__len__(self)
Return the number of bits in a bit vector. |
source code
|
|
|
__int__(self)
Return the integer value of a bitvector |
source code
|
|
|
__iter__(self)
To allow iterations over a bit vector by supporting the 'for bit
in bit_vector' syntax: |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_make_deep_copy(self)
Make a deep copy of a bit vector |
source code
|
|
|
|
|
|
|
pad_from_left(self,
n)
Pad a bit vector with n zeros from the left |
source code
|
|
|
pad_from_right(self,
n)
Pad a bit vector with n zeros from the right |
source code
|
|
|
__contains__(self,
otherBitVec)
This supports 'if x in y' and 'if x not in y' syntax for bit
vectors. |
source code
|
|
Inherited from object :
__delattr__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__
|