rdkit.DataStructs.cDataStructs.ExplicitBitVect

Package rdkit :: Package DataStructs :: Module cDataStructs :: Class ExplicitBitVect |
[hide private]
[frames] | no frames]

# Class ExplicitBitVect

     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]).

Instance Methods | [hide private]
FromBase64(...) FromBase64( (ExplicitBitVect)arg1, (str)arg2) -> None : Initializes the vector from a base64 encoded binary string. |
GetBit(...) GetBit( (ExplicitBitVect)arg1, (int)arg2) -> bool : Returns the value of a bit. |
GetNumBits(...) GetNumBits( (ExplicitBitVect)arg1) -> int : Returns the number of bits in the vector (the vector's size). |
GetNumOffBits(...) GetNumOffBits( (ExplicitBitVect)arg1) -> int : Returns the number of off bits. |
GetNumOnBits(...) GetNumOnBits( (ExplicitBitVect)arg1) -> int : Returns the number of on bits. |
GetOnBits(...) GetOnBits( (ExplicitBitVect)arg1) -> _vecti : Returns a tuple containing IDs of the on bits. |
SetBit(...) SetBit( (ExplicitBitVect)arg1, (int)arg2) -> bool : Turns on a particular bit. |
SetBitsFromList(...) SetBitsFromList( (ExplicitBitVect)arg1, (AtomPairsParameters)arg2) -> None : Turns on a set of bits. |
ToBase64(...) ToBase64( (ExplicitBitVect)arg1) -> str : Converts the vector to a base64 string (the base64 encoded version of the results of ToString()). |
ToBinary(...) ToBinary( (ExplicitBitVect)arg1) -> object : Returns an internal binary representation of the vector. |
ToBitString(...) BitVectToText( (SparseBitVect)arg1) -> str : |
UnSetBit(...) UnSetBit( (ExplicitBitVect)arg1, (int)arg2) -> bool : Turns off a particular bit. |
UnSetBitsFromList(...) UnSetBitsFromList( (ExplicitBitVect)arg1, (AtomPairsParameters)arg2) -> None : Turns off a set of bits. |
__add__(...) __add__( (ExplicitBitVect)arg1, (ExplicitBitVect)arg2) -> object : |
__and__(...) __and__( (ExplicitBitVect)arg1, (ExplicitBitVect)arg2) -> object : |
__eq__(...) __eq__( (ExplicitBitVect)arg1, (ExplicitBitVect)arg2) -> object : |
__getinitargs__(...) __getinitargs__( (ExplicitBitVect)arg1) -> tuple : |
__getitem__(...) __getitem__( (ExplicitBitVect)arg1, (int)arg2) -> int : |
__iadd__(...) __iadd__( (object)arg1, (ExplicitBitVect)arg2) -> object : |
__init__(...) __init__( (object)arg1, (int)arg2) -> None : |
__invert__(...) __invert__( (ExplicitBitVect)arg1) -> object : |
__len__(...) __len__( (ExplicitBitVect)arg1) -> int : |
__ne__(...) __ne__( (ExplicitBitVect)arg1, (ExplicitBitVect)arg2) -> object : |
__or__(...) __or__( (ExplicitBitVect)arg1, (ExplicitBitVect)arg2) -> object : |
__reduce__(...) helper for pickle |
__setitem__(...) __setitem__( (ExplicitBitVect)arg1, (int)arg2, (int)arg3) -> int : |
__xor__(...) __xor__( (ExplicitBitVect)arg1, (ExplicitBitVect)arg2) -> object : |
Inherited from `unreachable.instance`: `__new__` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__sizeof__`, `__str__`, `__subclasshook__`

Class Variables | [hide private]
| __instance_size__ = `32`
| __safe_for_unpickling__ = `True`

Properties | [hide private]
Inherited from `object`: `__class__`

Method Details | [hide private]

### FromBase64(...) |
    FromBase64( (ExplicitBitVect)arg1, (str)arg2) -> None :
        Initializes the vector from a base64 encoded binary string.

        C++ signature :
            void FromBase64(ExplicitBitVect {lvalue},std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)

### GetBit(...) |
    GetBit( (ExplicitBitVect)arg1, (int)arg2) -> bool :
        Returns the value of a bit.

        C++ signature :
            bool GetBit(ExplicitBitVect {lvalue},unsigned int)

### GetNumBits(...) |
    GetNumBits( (ExplicitBitVect)arg1) -> int :
        Returns the number of bits in the vector (the vector's size).

        C++ signature :
            unsigned int GetNumBits(ExplicitBitVect {lvalue})

### GetNumOffBits(...) |
    GetNumOffBits( (ExplicitBitVect)arg1) -> int :
        Returns the number of off bits.

        C++ signature :
            unsigned int GetNumOffBits(ExplicitBitVect {lvalue})

### GetNumOnBits(...) |
    GetNumOnBits( (ExplicitBitVect)arg1) -> int :
        Returns the number of on bits.

        C++ signature :
            unsigned int GetNumOnBits(ExplicitBitVect {lvalue})

### GetOnBits(...) |
    GetOnBits( (ExplicitBitVect)arg1) -> _vecti :
        Returns a tuple containing IDs of the on bits.

        C++ signature :
            std::vector<int, std::allocator<int> > GetOnBits(ExplicitBitVect)

### SetBit(...) |
    SetBit( (ExplicitBitVect)arg1, (int)arg2) -> bool :
        Turns on a particular bit.  Returns the original state of the bit.

        C++ signature :
            bool SetBit(ExplicitBitVect {lvalue},unsigned int)

### SetBitsFromList(...) |
    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(...) |
    ToBase64( (ExplicitBitVect)arg1) -> str :
        Converts the vector to a base64 string (the base64 encoded version of the results of ToString()).

        C++ signature :
            std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > ToBase64(ExplicitBitVect {lvalue})

### ToBinary(...) |
    ToBinary( (ExplicitBitVect)arg1) -> object :
        Returns an internal binary representation of the vector.

        C++ signature :
            boost::python::api::object ToBinary(ExplicitBitVect)

### ToBitString(...) |
    BitVectToText( (SparseBitVect)arg1) -> str :

        C++ signature :
            std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > BitVectToText(SparseBitVect)

    BitVectToText( (ExplicitBitVect)arg1) -> str :
        Returns a string of zeros and ones representing the bit vector.

        C++ signature :
            std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > BitVectToText(ExplicitBitVect)

### UnSetBit(...) |
    UnSetBit( (ExplicitBitVect)arg1, (int)arg2) -> bool :
        Turns off a particular bit.  Returns the original state of the bit.

        C++ signature :
            bool UnSetBit(ExplicitBitVect {lvalue},unsigned int)

### UnSetBitsFromList(...) |
    UnSetBitsFromList( (ExplicitBitVect)arg1, (AtomPairsParameters)arg2) -> None :
        Turns off a set of bits.  The argument should be a tuple or list of bit ids.

        C++ signature :
            void UnSetBitsFromList(ExplicitBitVect*,boost::python::api::object)

### __add__(...) (Addition operator) |
    __add__( (ExplicitBitVect)arg1, (ExplicitBitVect)arg2) -> object :

        C++ signature :
            _object* __add__(ExplicitBitVect {lvalue},ExplicitBitVect)

### __and__(...) (And operator) |
    __and__( (ExplicitBitVect)arg1, (ExplicitBitVect)arg2) -> object :

        C++ signature :
            _object* __and__(ExplicitBitVect {lvalue},ExplicitBitVect)

### __eq__(...) (Equality operator) |
    __eq__( (ExplicitBitVect)arg1, (ExplicitBitVect)arg2) -> object :

        C++ signature :
            _object* __eq__(ExplicitBitVect {lvalue},ExplicitBitVect)

### __getinitargs__(...) |
    __getinitargs__( (ExplicitBitVect)arg1) -> tuple :

        C++ signature :
            boost::python::tuple __getinitargs__(ExplicitBitVect)

### __getitem__(...) (Indexing operator) |
    __getitem__( (ExplicitBitVect)arg1, (int)arg2) -> int :

        C++ signature :
            int __getitem__(ExplicitBitVect,int)

### __iadd__(...) |
    __iadd__( (object)arg1, (ExplicitBitVect)arg2) -> object :

        C++ signature :
            _object* __iadd__(boost::python::back_reference<ExplicitBitVect&>,ExplicitBitVect)

### __init__(...) (Constructor) |
    __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::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)

    __init__( (object)arg1, (int)arg2, (bool)arg3) -> None :

        C++ signature :
            void __init__(_object*,unsigned int,bool)
Overrides: object.__init__

### __invert__(...) |
    __invert__( (ExplicitBitVect)arg1) -> object :

        C++ signature :
            _object* __invert__(ExplicitBitVect {lvalue})

### __len__(...) (Length operator) |
    __len__( (ExplicitBitVect)arg1) -> int :

        C++ signature :
            unsigned int __len__(ExplicitBitVect {lvalue})

### __ne__(...) |
    __ne__( (ExplicitBitVect)arg1, (ExplicitBitVect)arg2) -> object :

        C++ signature :
            _object* __ne__(ExplicitBitVect {lvalue},ExplicitBitVect)

### __or__(...) (Or operator) |
    __or__( (ExplicitBitVect)arg1, (ExplicitBitVect)arg2) -> object :

        C++ signature :
            _object* __or__(ExplicitBitVect {lvalue},ExplicitBitVect)

### __reduce__(...) |
    helper for pickle
Overrides: object.__reduce__ (inherited documentation)

### __setitem__(...) (Index assignment operator) |
    __setitem__( (ExplicitBitVect)arg1, (int)arg2, (int)arg3) -> int :

        C++ signature :
            int __setitem__(ExplicitBitVect {lvalue},int,int)

### __xor__(...) (Exclusive-Or operator) |
    __xor__( (ExplicitBitVect)arg1, (ExplicitBitVect)arg2) -> object :

        C++ signature :
            _object* __xor__(ExplicitBitVect {lvalue},ExplicitBitVect)