![]() |
Chemical Data Processing Library Python API - Version 1.2.3
|
A dynamic bitset class. More...
Inheritance diagram for CDPL.Util.BitSet:Public Member Functions | |
| None | __init__ () |
| Initializes the BitSet instance. | |
| None | __init__ (BitSet bs) |
| Initializes a copy of the BitSet instance bs. More... | |
| None | __init__ (int num_bits, int value=0) |
| Initializes the BitSet instance. More... | |
| None | __init__ (str bit_str) |
| Initializes the BitSet instance. More... | |
| int | getObjectID () |
| Returns the numeric identifier (ID) of the wrapped C++ class instance. More... | |
| None | swap (BitSet bs) |
| BitSet | assign (BitSet bs) |
Replaces the current state of self with a copy of the state of the BitSet instance bs. More... | |
| None | resize (int num_bits, bool value=False) |
| None | clear () |
| None | append (bool value) |
| BitSet | flip () |
| BitSet | flip (int idx) |
| BitSet | set () |
| BitSet | set (int idx, bool value=True) |
| BitSet | reset () |
| BitSet | reset (int idx) |
| bool | test (int idx) |
| int | findFirst () |
| int | findNext (int idx) |
| bool | isSubsetOf (BitSet bs) |
| bool | isProperSubsetOf (BitSet bs) |
| bool | isEmpty () |
| int | getCount () |
| int | getSize () |
| int | getMaxSize () |
| bool | hasAny () |
| bool | hasNone () |
| bool | __getitem__ (int idx) |
| None | __setitem__ (int idx, bool value) |
| BitSet | __and__ (BitSet bs) |
| BitSet | __or__ (BitSet bs) |
| BitSet | __xor__ (BitSet bs) |
| BitSet | __sub__ (BitSet bs) |
Returns the result of the subtraction operation self - bs. More... | |
| BitSet | __iand__ (BitSet bs) |
| BitSet | __ior__ (BitSet bs) |
| BitSet | __ixor__ (BitSet bs) |
| BitSet | __isub__ (BitSet bs) |
Performs the in-place subtraction operation self -= bs. More... | |
| int | __long__ () |
| BitSet | __ilshift__ (int num_bits) |
| BitSet | __lshift__ (int num_bits) |
| BitSet | __irshift__ (int num_bits) |
| BitSet | __rshift__ (int num_bits) |
| BitSet | __invert__ () |
| bool | __eq__ (BitSet bs) |
Returns the result of the comparison operation self == bs. More... | |
| bool | __ne__ (BitSet bs) |
Returns the result of the comparison operation self != bs. More... | |
| bool | __lt__ (BitSet bs) |
Returns the result of the comparison operation self < bs. More... | |
| bool | __le__ (BitSet bs) |
Returns the result of the comparison operation self <= bs. More... | |
| bool | __gt__ (BitSet bs) |
Returns the result of the comparison operation self > bs. More... | |
| bool | __ge__ (BitSet bs) |
Returns the result of the comparison operation self >= bs. More... | |
| int | __len__ () |
| bool | __nonzero__ () |
| bool | __bool__ () |
| str | __str__ () |
| Returns a string representation of the BitSet instance. More... | |
Static Public Attributes | |
| int | npos = 18446744073709551615 |
Properties | |
| objectID = property(getObjectID) | |
| empty = property(isEmpty) | |
| count = property(getCount) | |
| size = property(getSize) | |
| maxSize = property(getMaxSize) | |
| any = property(hasAny) | |
| none = property(hasNone) | |
A dynamic bitset class.
For further information see [BDBS].
| None CDPL.Util.BitSet.__init__ | ( | BitSet | bs | ) |
Initializes a copy of the BitSet instance bs.
| bs | The BitSet instance to copy. |
| None CDPL.Util.BitSet.__init__ | ( | int | num_bits, |
| int | value = 0 |
||
| ) |
Initializes the BitSet instance.
| num_bits | |
| value |
| None CDPL.Util.BitSet.__init__ | ( | str | bit_str | ) |
Initializes the BitSet instance.
| bit_str |
| int CDPL.Util.BitSet.getObjectID | ( | ) |
Returns the numeric identifier (ID) of the wrapped C++ class instance.
Different Python BitSet instances may reference the same underlying C++ class instance. The commonly used Python expression a is not b thus cannot tell reliably whether the two BitSet instances a and b reference different C++ objects. The numeric identifier returned by this method allows to correctly implement such an identity test via the simple expression a.getObjectID() != b.getObjectID().
| None CDPL.Util.BitSet.swap | ( | BitSet | bs | ) |
| bs |
Replaces the current state of self with a copy of the state of the BitSet instance bs.
| bs | The BitSet instance to copy. |
| None CDPL.Util.BitSet.resize | ( | int | num_bits, |
| bool | value = False |
||
| ) |
| num_bits | |
| value |
| None CDPL.Util.BitSet.append | ( | bool | value | ) |
| value |
| BitSet CDPL.Util.BitSet.flip | ( | ) |
| BitSet CDPL.Util.BitSet.flip | ( | int | idx | ) |
| idx |
| BitSet CDPL.Util.BitSet.set | ( | ) |
| BitSet CDPL.Util.BitSet.set | ( | int | idx, |
| bool | value = True |
||
| ) |
| idx | |
| value |
| BitSet CDPL.Util.BitSet.reset | ( | ) |
| BitSet CDPL.Util.BitSet.reset | ( | int | idx | ) |
| idx |
| bool CDPL.Util.BitSet.test | ( | int | idx | ) |
| idx |
| int CDPL.Util.BitSet.findFirst | ( | ) |
| int CDPL.Util.BitSet.findNext | ( | int | idx | ) |
| idx |
| bool CDPL.Util.BitSet.isSubsetOf | ( | BitSet | bs | ) |
| bs |
| bool CDPL.Util.BitSet.isProperSubsetOf | ( | BitSet | bs | ) |
| bs |
| bool CDPL.Util.BitSet.isEmpty | ( | ) |
| int CDPL.Util.BitSet.getCount | ( | ) |
| int CDPL.Util.BitSet.getSize | ( | ) |
| int CDPL.Util.BitSet.getMaxSize | ( | ) |
| bool CDPL.Util.BitSet.hasAny | ( | ) |
| bool CDPL.Util.BitSet.hasNone | ( | ) |
| bool CDPL.Util.BitSet.__getitem__ | ( | int | idx | ) |
| idx |
| None CDPL.Util.BitSet.__setitem__ | ( | int | idx, |
| bool | value | ||
| ) |
| idx | |
| value |
Returns the result of the subtraction operation self - bs.
| bs | Specifies the subtrahend. |
BitSet instance holding the result of the subtraction. Performs the in-place subtraction operation self -= bs.
| bs | Specifies the subtrahend. |
BitSet instance self. | int CDPL.Util.BitSet.__long__ | ( | ) |
| BitSet CDPL.Util.BitSet.__ilshift__ | ( | int | num_bits | ) |
| num_bits |
| BitSet CDPL.Util.BitSet.__lshift__ | ( | int | num_bits | ) |
| num_bits |
| BitSet CDPL.Util.BitSet.__irshift__ | ( | int | num_bits | ) |
| num_bits |
| BitSet CDPL.Util.BitSet.__rshift__ | ( | int | num_bits | ) |
| num_bits |
| BitSet CDPL.Util.BitSet.__invert__ | ( | ) |
| bool CDPL.Util.BitSet.__eq__ | ( | BitSet | bs | ) |
Returns the result of the comparison operation self == bs.
| bs | The BitSet instance to be compared with. |
| bool CDPL.Util.BitSet.__ne__ | ( | BitSet | bs | ) |
Returns the result of the comparison operation self != bs.
| bs | The BitSet instance to be compared with. |
| bool CDPL.Util.BitSet.__lt__ | ( | BitSet | bs | ) |
Returns the result of the comparison operation self < bs.
| bs | The BitSet instance to be compared with. |
| bool CDPL.Util.BitSet.__le__ | ( | BitSet | bs | ) |
Returns the result of the comparison operation self <= bs.
| bs | The BitSet instance to be compared with. |
| bool CDPL.Util.BitSet.__gt__ | ( | BitSet | bs | ) |
Returns the result of the comparison operation self > bs.
| bs | The BitSet instance to be compared with. |
| bool CDPL.Util.BitSet.__ge__ | ( | BitSet | bs | ) |
Returns the result of the comparison operation self >= bs.
| bs | The BitSet instance to be compared with. |
| int CDPL.Util.BitSet.__len__ | ( | ) |
| bool CDPL.Util.BitSet.__nonzero__ | ( | ) |
| bool CDPL.Util.BitSet.__bool__ | ( | ) |
| str CDPL.Util.BitSet.__str__ | ( | ) |
Returns a string representation of the BitSet instance.