| Trees | Indices | Help |
|
|---|
|
|
object --+
|
??.instance --+
|
ExplicitBitVect
A class to store explicit bit vectors. This class is most useful for situations where the size of the vector is relatively small (tens of thousands or smaller). For larger vectors, use the _SparseBitVect_ class instead. As you would expect, _ExplicitBitVects_ support a set of binary operations so you can do things like: bv3 = bv1 & bv2 (bitwise and) bv3 = bv1 | bv2 (bitwise or) bv3 = bv1 ^ bv2 (bitwise xor) bv3 = ~bv1 (bitwise negation) Bits can be set and read using either the Set/UnsetBit() and GetBit() methods or by indexing (i.e. bv[i] = 1 or if bv[i]).
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from Inherited from |
|||
|
|||
__instance_size__ = 24
|
|||
__safe_for_unpickling__ = True
|
|||
|
|||
|
Inherited from |
|||
|
|||
FromBase64( (ExplicitBitVect)arg1, (str)arg2) -> None :
Initializes the vector from a base64 string (the Daylight encoding).
C++ signature :
void FromBase64(ExplicitBitVect {lvalue},std::string)
|
GetBit( (ExplicitBitVect)arg1, (int)arg2) -> bool :
Returns the value of a bit.
C++ signature :
bool GetBit(ExplicitBitVect {lvalue},unsigned int)
|
GetNumBits( (ExplicitBitVect)arg1) -> int :
Returns the number of bits in the vector (the vector's size).
C++ signature :
unsigned int GetNumBits(ExplicitBitVect {lvalue})
|
GetNumOffBits( (ExplicitBitVect)arg1) -> int :
Returns the number of off bits.
C++ signature :
unsigned int GetNumOffBits(ExplicitBitVect {lvalue})
|
GetNumOnBits( (ExplicitBitVect)arg1) -> int :
Returns the number of on bits.
C++ signature :
unsigned int GetNumOnBits(ExplicitBitVect {lvalue})
|
GetOnBits( (ExplicitBitVect)arg1) -> _vecti :
Returns a tuple containing IDs of the on bits.
C++ signature :
std::vector<int, std::allocator<int> > GetOnBits(ExplicitBitVect)
|
SetBit( (ExplicitBitVect)arg1, (int)arg2) -> bool :
Turns on a particular bit on. Returns the original state of the bit.
C++ signature :
bool SetBit(ExplicitBitVect {lvalue},unsigned int)
|
SetBitsFromList( (ExplicitBitVect)arg1, (AtomPairsParameters)arg2) -> None :
Turns on a set of bits. The argument should be a tuple or list of bit ids.
C++ signature :
void SetBitsFromList(ExplicitBitVect*,boost::python::api::object)
|
ToBase64( (ExplicitBitVect)arg1) -> str :
Converts the vector to a base64 string (the Daylight encoding).
C++ signature :
std::string ToBase64(ExplicitBitVect {lvalue})
|
ToBinary( (ExplicitBitVect)arg1) -> str :
Returns a binary string representation of the vector.
C++ signature :
std::string ToBinary(ExplicitBitVect {lvalue})
|
BitVectToText( (SparseBitVect)arg1) -> str :
C++ signature :
std::string BitVectToText(SparseBitVect)
BitVectToText( (ExplicitBitVect)arg1) -> str :
Returns a string of zeros and ones representing the bit vector.
C++ signature :
std::string BitVectToText(ExplicitBitVect)
|
UnSetBit( (ExplicitBitVect)arg1, (int)arg2) -> bool :
Turns on a particular bit off. Returns the original state of the bit.
C++ signature :
bool UnSetBit(ExplicitBitVect {lvalue},unsigned int)
|
__and__( (ExplicitBitVect)arg1, (ExplicitBitVect)arg2) -> object :
C++ signature :
_object* __and__(ExplicitBitVect {lvalue},ExplicitBitVect)
|
__eq__( (ExplicitBitVect)arg1, (ExplicitBitVect)arg2) -> object :
C++ signature :
_object* __eq__(ExplicitBitVect {lvalue},ExplicitBitVect)
|
__getinitargs__( (ExplicitBitVect)arg1) -> tuple :
C++ signature :
boost::python::tuple __getinitargs__(ExplicitBitVect)
|
__getitem__( (ExplicitBitVect)arg1, (int)arg2) -> int :
C++ signature :
int __getitem__(ExplicitBitVect,int)
|
__init__( (object)arg1, (int)arg2) -> None :
C++ signature :
void __init__(_object*,unsigned int)
__init__( (object)arg1, (str)arg2) -> None :
C++ signature :
void __init__(_object*,std::string)
|
__invert__( (ExplicitBitVect)arg1) -> object :
C++ signature :
_object* __invert__(ExplicitBitVect {lvalue})
|
__len__( (ExplicitBitVect)arg1) -> int :
C++ signature :
unsigned int __len__(ExplicitBitVect {lvalue})
|
__ne__( (ExplicitBitVect)arg1, (ExplicitBitVect)arg2) -> object :
C++ signature :
_object* __ne__(ExplicitBitVect {lvalue},ExplicitBitVect)
|
__or__( (ExplicitBitVect)arg1, (ExplicitBitVect)arg2) -> object :
C++ signature :
_object* __or__(ExplicitBitVect {lvalue},ExplicitBitVect)
|
helper for pickle
|
__setitem__( (ExplicitBitVect)arg1, (int)arg2, (int)arg3) -> int :
C++ signature :
int __setitem__(ExplicitBitVect {lvalue},int,int)
|
__xor__( (ExplicitBitVect)arg1, (ExplicitBitVect)arg2) -> object :
C++ signature :
_object* __xor__(ExplicitBitVect {lvalue},ExplicitBitVect)
|
| Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0beta1 on Tue Oct 7 06:26:50 2008 | http://epydoc.sourceforge.net |