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

Class IntSparseIntVect



 object --+    
          |    
??.instance --+
              |
             IntSparseIntVect

A container class for storing integer
values within a particular range.

The length of the vector is set at construction time.

As you would expect, _SparseIntVects_ support a set of binary operations
so you can do things like:
  Arithmetic:
  siv1 += siv2
  siv3 = siv1 + siv2
  siv1 -= siv3
  siv3 = siv1 - siv2
  "Fuzzy" binary operations:
  siv3 = siv1 & siv2  the result contains the smallest value in each entry
  siv3 = siv1 | siv2  the result contains the largest value in each entry

Elements can be set and read using indexing (i.e. siv[i] = 4 or val=siv[i])



Instance Methods [hide private]
 
GetLength(...)
Returns the length of the vector...
 
GetNonzeroElements(...)
returns a dictionary of the nonzero elements...
 
GetTotalVal(...)
Get the sum of the values in the vector, basically L1 norm...
 
ToBinary(...)
returns a binary (pickle) representation of the vector...
 
UpdateFromSequence(...)
update the vector based on the values in the list or tuple...
 
__add__(...)
C++ signature:...
 
__and__(...)
C++ signature:...
 
__eq__(...)
C++ signature:...
 
__getinitargs__(...)
C++ signature:...
 
__getitem__(...)
Get the value at a specified location...
 
__iadd__(...)
C++ signature:...
 
__init__(...)
Constructor...
 
__isub__(...)
C++ signature:...
 
__ne__(...)
C++ signature:...
 
__or__(...)
C++ signature:...
 
__reduce__(...)
helper for pickle
 
__setitem__(...)
Set the value at a specified location...
 
__sub__(...)
C++ signature:...

Inherited from unreachable.instance: __new__

Inherited from object: __delattr__, __getattribute__, __hash__, __reduce_ex__, __repr__, __setattr__, __str__

Class Variables [hide private]
  __instance_size__ = 36
  __safe_for_unpickling__ = True
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

GetLength(...)

 
Returns the length of the vector
C++ signature:
    GetLength(RDKit::SparseIntVect<int> {lvalue} useAbs=False) -> int

GetNonzeroElements(...)

 
returns a dictionary of the nonzero elements
C++ signature:
    GetNonzeroElements(RDKit::SparseIntVect<int> {lvalue}) -> boost::python::dict

GetTotalVal(...)

 
Get the sum of the values in the vector, basically L1 norm
C++ signature:
    GetTotalVal(RDKit::SparseIntVect<int> {lvalue} useAbs=False) -> int

ToBinary(...)

 
returns a binary (pickle) representation of the vector
C++ signature:
    ToBinary(RDKit::SparseIntVect<int> {lvalue}) -> std::string

UpdateFromSequence(...)

 
update the vector based on the values in the list or tuple
C++ signature:
    UpdateFromSequence(RDKit::SparseIntVect<int> {lvalue}, boost::python::api::object {lvalue}) -> void*

__add__(...)
(Addition operator)

 
C++ signature:
__add__(RDKit::SparseIntVect<int> {lvalue}, RDKit::SparseIntVect<int>) -> _object*

__and__(...)
(And operator)

 
C++ signature:
__and__(RDKit::SparseIntVect<int> {lvalue}, RDKit::SparseIntVect<int>) -> _object*

__eq__(...)
(Equality operator)

 
C++ signature:
__eq__(RDKit::SparseIntVect<int> {lvalue}, RDKit::SparseIntVect<int>) -> _object*

__getinitargs__(...)

 
C++ signature:
__getinitargs__(RDKit::SparseIntVect<int>) -> boost::python::tuple

__getitem__(...)
(Indexing operator)

 
Get the value at a specified location
C++ signature:
    __getitem__(RDKit::SparseIntVect<int> {lvalue}, int) -> int

__iadd__(...)

 
C++ signature:
__iadd__(boost::python::back_reference<RDKit::SparseIntVect<int>&>, RDKit::SparseIntVect<int>) -> _object*

__init__(...)
(Constructor)

 
Constructor
C++ signature:
    __init__(_object*, int) -> void*
C++ signature:
    __init__(_object*, std::string) -> void*

Overrides: object.__init__

__isub__(...)

 
C++ signature:
__isub__(boost::python::back_reference<RDKit::SparseIntVect<int>&>, RDKit::SparseIntVect<int>) -> _object*

__ne__(...)

 
C++ signature:
__ne__(RDKit::SparseIntVect<int> {lvalue}, RDKit::SparseIntVect<int>) -> _object*

__or__(...)
(Or operator)

 
C++ signature:
__or__(RDKit::SparseIntVect<int> {lvalue}, RDKit::SparseIntVect<int>) -> _object*

__reduce__(...)

 
helper for pickle

Overrides: object.__reduce__
(inherited documentation)

__setitem__(...)
(Index assignment operator)

 
Set the value at a specified location
C++ signature:
    __setitem__(RDKit::SparseIntVect<int> {lvalue}, int, int) -> void*

__sub__(...)
(Subtraction operator)

 
C++ signature:
__sub__(RDKit::SparseIntVect<int> {lvalue}, RDKit::SparseIntVect<int>) -> _object*