#include <SparseIntVect.h>
Public Types | |
| typedef std::map< IndexType, int > | StorageType |
Public Member Functions | |
| SparseIntVect () | |
| SparseIntVect (IndexType length) | |
| initialize with a particular length | |
| SparseIntVect (const SparseIntVect< IndexType > &other) | |
| Copy constructor. | |
| SparseIntVect (const std::string pkl) | |
| constructor from a pickle | |
| SparseIntVect (const char *pkl, const unsigned int len) | |
| constructor from a pickle | |
| ~SparseIntVect () | |
| destructor (doesn't need to do anything) | |
| int | getVal (IndexType idx) const |
| return the value at an index | |
| int | operator[] (IndexType idx) const |
| void | setVal (IndexType idx, int val) |
| set the value at an index | |
| IndexType | getLength () const |
| returns the length | |
| int | getTotalVal () const |
| returns the sum of all the elements in the vect | |
| const StorageType & | getNonzeroElements () const |
| returns our nonzero elements as a map(IndexType->int) | |
| SparseIntVect< IndexType > & | operator &= (const SparseIntVect< IndexType > &other) |
| const SparseIntVect< IndexType > | operator & (const SparseIntVect< IndexType > &other) const |
| SparseIntVect< IndexType > & | operator|= (const SparseIntVect< IndexType > &other) |
| const SparseIntVect< IndexType > | operator| (const SparseIntVect< IndexType > &other) const |
| SparseIntVect< IndexType > & | operator+= (const SparseIntVect< IndexType > &other) |
| const SparseIntVect< IndexType > | operator+ (const SparseIntVect< IndexType > &other) const |
| SparseIntVect< IndexType > & | operator-= (const SparseIntVect< IndexType > &other) |
| const SparseIntVect< IndexType > | operator- (const SparseIntVect< IndexType > &other) const |
| bool | operator== (const SparseIntVect< IndexType > &v2) const |
| bool | operator!= (const SparseIntVect< IndexType > &v2) const |
| std::string | toString () const |
| returns a binary string representation (pickle) | |
| void | fromString (const std::string &txt) |
Definition at line 22 of file SparseIntVect.h.
| typedef std::map<IndexType,int> RDKit::SparseIntVect< IndexType >::StorageType |
Definition at line 24 of file SparseIntVect.h.
| RDKit::SparseIntVect< IndexType >::SparseIntVect | ( | ) | [inline] |
Definition at line 26 of file SparseIntVect.h.
| RDKit::SparseIntVect< IndexType >::SparseIntVect | ( | IndexType | length | ) | [inline] |
| RDKit::SparseIntVect< IndexType >::SparseIntVect | ( | const SparseIntVect< IndexType > & | other | ) | [inline] |
Copy constructor.
Definition at line 32 of file SparseIntVect.h.
References RDKit::SparseIntVect< IndexType >::d_data, and RDKit::SparseIntVect< IndexType >::d_length.
| RDKit::SparseIntVect< IndexType >::SparseIntVect | ( | const std::string | pkl | ) | [inline] |
| RDKit::SparseIntVect< IndexType >::SparseIntVect | ( | const char * | pkl, | |
| const unsigned int | len | |||
| ) | [inline] |
| RDKit::SparseIntVect< IndexType >::~SparseIntVect | ( | ) | [inline] |
| int RDKit::SparseIntVect< IndexType >::getVal | ( | IndexType | idx | ) | const [inline] |
return the value at an index
Definition at line 50 of file SparseIntVect.h.
Referenced by RDKit::SparseIntVect< IndexType >::operator[](), and RDKit::updateFromSequence().
| int RDKit::SparseIntVect< IndexType >::operator[] | ( | IndexType | idx | ) | const [inline] |
Definition at line 61 of file SparseIntVect.h.
References RDKit::SparseIntVect< IndexType >::getVal().
| void RDKit::SparseIntVect< IndexType >::setVal | ( | IndexType | idx, | |
| int | val | |||
| ) | [inline] |
set the value at an index
Definition at line 64 of file SparseIntVect.h.
Referenced by RDKit::updateFromSequence().
| IndexType RDKit::SparseIntVect< IndexType >::getLength | ( | ) | const [inline] |
returns the length
Definition at line 75 of file SparseIntVect.h.
Referenced by RDKit::DiceSimilarity().
| int RDKit::SparseIntVect< IndexType >::getTotalVal | ( | ) | const [inline] |
returns the sum of all the elements in the vect
Definition at line 78 of file SparseIntVect.h.
Referenced by RDKit::DiceSimilarity().
| const StorageType& RDKit::SparseIntVect< IndexType >::getNonzeroElements | ( | ) | const [inline] |
returns our nonzero elements as a map(IndexType->int)
Definition at line 89 of file SparseIntVect.h.
Referenced by RDKit::DiceSimilarity().
| SparseIntVect<IndexType>& RDKit::SparseIntVect< IndexType >::operator &= | ( | const SparseIntVect< IndexType > & | other | ) | [inline] |
this is a "fuzzy" intesection, the final value of each element is equal to the minimum from the two vects.
Definition at line 98 of file SparseIntVect.h.
References RDKit::SparseIntVect< IndexType >::d_data, and RDKit::SparseIntVect< IndexType >::d_length.
| const SparseIntVect<IndexType> RDKit::SparseIntVect< IndexType >::operator & | ( | const SparseIntVect< IndexType > & | other | ) | const [inline] |
Definition at line 129 of file SparseIntVect.h.
| SparseIntVect<IndexType>& RDKit::SparseIntVect< IndexType >::operator|= | ( | const SparseIntVect< IndexType > & | other | ) | [inline] |
this is a "fuzzy" union, the final value of each element is equal to the maximum from the two vects.
Definition at line 138 of file SparseIntVect.h.
References RDKit::SparseIntVect< IndexType >::d_data, and RDKit::SparseIntVect< IndexType >::d_length.
| const SparseIntVect<IndexType> RDKit::SparseIntVect< IndexType >::operator| | ( | const SparseIntVect< IndexType > & | other | ) | const [inline] |
Definition at line 169 of file SparseIntVect.h.
| SparseIntVect<IndexType>& RDKit::SparseIntVect< IndexType >::operator+= | ( | const SparseIntVect< IndexType > & | other | ) | [inline] |
Definition at line 175 of file SparseIntVect.h.
References RDKit::SparseIntVect< IndexType >::d_data, and RDKit::SparseIntVect< IndexType >::d_length.
| const SparseIntVect<IndexType> RDKit::SparseIntVect< IndexType >::operator+ | ( | const SparseIntVect< IndexType > & | other | ) | const [inline] |
Definition at line 205 of file SparseIntVect.h.
| SparseIntVect<IndexType>& RDKit::SparseIntVect< IndexType >::operator-= | ( | const SparseIntVect< IndexType > & | other | ) | [inline] |
Definition at line 211 of file SparseIntVect.h.
References RDKit::SparseIntVect< IndexType >::d_data, and RDKit::SparseIntVect< IndexType >::d_length.
| const SparseIntVect<IndexType> RDKit::SparseIntVect< IndexType >::operator- | ( | const SparseIntVect< IndexType > & | other | ) | const [inline] |
Definition at line 241 of file SparseIntVect.h.
| bool RDKit::SparseIntVect< IndexType >::operator== | ( | const SparseIntVect< IndexType > & | v2 | ) | const [inline] |
Definition at line 246 of file SparseIntVect.h.
References RDKit::SparseIntVect< IndexType >::d_data, and RDKit::SparseIntVect< IndexType >::d_length.
| bool RDKit::SparseIntVect< IndexType >::operator!= | ( | const SparseIntVect< IndexType > & | v2 | ) | const [inline] |
Definition at line 252 of file SparseIntVect.h.
| std::string RDKit::SparseIntVect< IndexType >::toString | ( | ) | const [inline] |
returns a binary string representation (pickle)
Definition at line 257 of file SparseIntVect.h.
References ci_SPARSEINTVECT_VERSION, and RDKit::streamWrite().
| void RDKit::SparseIntVect< IndexType >::fromString | ( | const std::string & | txt | ) | [inline] |
Definition at line 278 of file SparseIntVect.h.
1.5.5