| 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 |
|||
|
|||
Initializes the vector from a base64 string (the Daylight encoding).
C++ signature:
FromBase64(ExplicitBitVect {lvalue}, std::string) -> void*
|
Returns the value of a bit.
C++ signature:
GetBit(ExplicitBitVect {lvalue}, unsigned int) -> bool
|
Returns the number of bits in the vector (the vector's size).
C++ signature:
GetNumBits(ExplicitBitVect {lvalue}) -> unsigned int
|
Returns the number of off bits.
C++ signature:
GetNumOffBits(ExplicitBitVect {lvalue}) -> unsigned int
|
Returns the number of on bits.
C++ signature:
GetNumOnBits(ExplicitBitVect {lvalue}) -> unsigned int
|
Returns a tuple containing IDs of the on bits.
C++ signature:
GetOnBits(ExplicitBitVect) -> std::vector<int, std::allocator<int> >
|
Turns on a particular bit on. Returns the original state of the bit.
C++ signature:
SetBit(ExplicitBitVect {lvalue}, unsigned int) -> bool
|
Turns on a set of bits. The argument should be a tuple or list of bit ids.
C++ signature:
SetBitsFromList(ExplicitBitVect*, boost::python::api::object) -> void*
|
Converts the vector to a base64 string (the Daylight encoding).
C++ signature:
ToBase64(ExplicitBitVect {lvalue}) -> std::string
|
Returns a binary string representation of the vector.
C++ signature:
ToBinary(ExplicitBitVect {lvalue}) -> std::string
|
C++ signature:
BitVectToText(SparseBitVect) -> std::string
Returns a string of zeros and ones representing the bit vector.
C++ signature:
BitVectToText(ExplicitBitVect) -> std::string
|
Turns on a particular bit off. Returns the original state of the bit.
C++ signature:
UnSetBit(ExplicitBitVect {lvalue}, unsigned int) -> bool
|
C++ signature:
__and__(ExplicitBitVect {lvalue}, ExplicitBitVect) -> _object*
|
C++ signature: __getinitargs__(ExplicitBitVect) -> boost::python::tuple |
C++ signature: __getitem__(ExplicitBitVect, unsigned int) -> int |
C++ signature:
__init__(_object*, unsigned int) -> void*
C++ signature:
__init__(_object*, std::string) -> void*
|
C++ signature:
__invert__(ExplicitBitVect {lvalue}) -> _object*
|
C++ signature:
__len__(ExplicitBitVect {lvalue}) -> unsigned int
|
C++ signature:
__or__(ExplicitBitVect {lvalue}, ExplicitBitVect) -> _object*
|
helper for pickle
|
C++ signature:
__setitem__(ExplicitBitVect {lvalue}, unsigned int, int) -> int
|
C++ signature:
__xor__(ExplicitBitVect {lvalue}, ExplicitBitVect) -> _object*
|
| Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0beta1 on Sat May 24 08:37:06 2008 | http://epydoc.sourceforge.net |