A Catalog with a hierarchical structure. More...
#include <Catalog.h>
Classes | |
| struct | vertex_entry_t |
| used by the BGL to set up the node properties in our graph More... | |
Public Types | |
| typedef boost::property < vertex_entry_t, entryType * > | EntryProperty |
| typedef boost::adjacency_list < boost::vecS, boost::vecS, boost::bidirectionalS, EntryProperty > | CatalogGraph |
| the type of the graph itself: | |
| typedef boost::graph_traits < CatalogGraph > | CAT_GRAPH_TRAITS |
| typedef CAT_GRAPH_TRAITS::vertex_iterator | VER_ITER |
| typedef std::pair< VER_ITER, VER_ITER > | ENT_ITER_PAIR |
| typedef CAT_GRAPH_TRAITS::adjacency_iterator | DOWN_ENT_ITER |
| typedef std::pair < DOWN_ENT_ITER, DOWN_ENT_ITER > | DOWN_ENT_ITER_PAIR |
Public Member Functions | |
| HierarchCatalog () | |
| HierarchCatalog (paramType *params) | |
Construct by making a copy of the input params object. | |
| HierarchCatalog (const std::string &pickle) | |
Construct from a pickle (a serialized form of the HierarchCatalog). | |
| ~HierarchCatalog () | |
| void | toStream (std::ostream &ss) const |
| serializes this object to a stream | |
| std::string | Serialize () const |
serializes this object and returns the resulting pickle | |
| void | initFromStream (std::istream &ss) |
fills the contents of this object from a stream containing a pickle | |
| unsigned int | getNumEntries () const |
| returns the number of entries | |
| void | initFromString (const std::string &text) |
fills the contents of this object from a string containing a pickle | |
| unsigned int | addEntry (entryType *entry, bool updateFPLength=true) |
| add a new entry to the catalog | |
| void | addEdge (unsigned int id1, unsigned int id2) |
| adds an edge between two entries in the catalog | |
| const entryType * | getEntryWithIdx (unsigned int idx) const |
| returns a pointer to our entry with a particular index | |
| const entryType * | getEntryWithBitId (unsigned int idx) const |
| returns a pointer to our entry with a particular bit ID | |
| int | getIdOfEntryWithBitId (unsigned int idx) const |
| returns the index of the entry with a particular bit ID | |
| RDKit::INT_VECT | getDownEntryList (unsigned int idx) const |
| returns a list of the indices of entries below the one passed in | |
| const RDKit::INT_VECT & | getEntriesOfOrder (orderType ord) |
| returns a list of the indices that have a particular order | |
| const RDKit::INT_VECT & | getEntriesOfOrder (orderType ord) const |
| returns a list of the indices that have a particular order | |
A Catalog with a hierarchical structure.
The entries of a HierarchCatalog are arranged in a directed graph
The difference between Indices and Bit Ids
A HierarchCatalog may contain more entries than the user is actually interested in. For example a HierarchCatalog constructed to contain orders 5 through 8 may well contain information about orders 1-5, in order to facilitate some search optimizations.
0 will be the first entry with order 5.0 will be the first entry with order 1. Definition at line 131 of file Catalog.h.
| typedef boost::graph_traits<CatalogGraph> RDCatalog::HierarchCatalog< entryType, paramType, orderType >::CAT_GRAPH_TRAITS |
| typedef boost::adjacency_list<boost::vecS, boost::vecS, boost::bidirectionalS, EntryProperty> RDCatalog::HierarchCatalog< entryType, paramType, orderType >::CatalogGraph |
| typedef CAT_GRAPH_TRAITS::adjacency_iterator RDCatalog::HierarchCatalog< entryType, paramType, orderType >::DOWN_ENT_ITER |
| typedef std::pair<DOWN_ENT_ITER, DOWN_ENT_ITER> RDCatalog::HierarchCatalog< entryType, paramType, orderType >::DOWN_ENT_ITER_PAIR |
| typedef std::pair<VER_ITER, VER_ITER> RDCatalog::HierarchCatalog< entryType, paramType, orderType >::ENT_ITER_PAIR |
| typedef boost::property<vertex_entry_t, entryType *> RDCatalog::HierarchCatalog< entryType, paramType, orderType >::EntryProperty |
| typedef CAT_GRAPH_TRAITS::vertex_iterator RDCatalog::HierarchCatalog< entryType, paramType, orderType >::VER_ITER |
| RDCatalog::HierarchCatalog< entryType, paramType, orderType >::HierarchCatalog | ( | ) | [inline] |
| RDCatalog::HierarchCatalog< entryType, paramType, orderType >::HierarchCatalog | ( | paramType * | params | ) | [inline] |
| RDCatalog::HierarchCatalog< entryType, paramType, orderType >::HierarchCatalog | ( | const std::string & | pickle | ) | [inline] |
Construct from a pickle (a serialized form of the HierarchCatalog).
| RDCatalog::HierarchCatalog< entryType, paramType, orderType >::~HierarchCatalog | ( | ) | [inline] |
| void RDCatalog::HierarchCatalog< entryType, paramType, orderType >::addEdge | ( | unsigned int | id1, | |
| unsigned int | id2 | |||
| ) | [inline] |
adds an edge between two entries in the catalog
Since we are using a bidirectional graph - the order in which the ids are supplied here makes a difference
| id1 | index of the edge's beginning | |
| id2 | index of the edge's end |
Definition at line 332 of file Catalog.h.
References RDCatalog::HierarchCatalog< entryType, paramType, orderType >::getNumEntries().
Referenced by RDCatalog::HierarchCatalog< entryType, paramType, orderType >::initFromStream().
| unsigned int RDCatalog::HierarchCatalog< entryType, paramType, orderType >::addEntry | ( | entryType * | entry, | |
| bool | updateFPLength = true | |||
| ) | [inline, virtual] |
add a new entry to the catalog
| entry | the entry to be added | |
| updateFPLength | (optional) if this is true, our internal fingerprint length will also be updated. |
Implements RDCatalog::Catalog< entryType, paramType >.
Definition at line 301 of file Catalog.h.
References RDCatalog::Catalog< entryType, paramType >::getFPLength(), and RDCatalog::Catalog< entryType, paramType >::setFPLength().
Referenced by RDCatalog::HierarchCatalog< entryType, paramType, orderType >::initFromStream().
| RDKit::INT_VECT RDCatalog::HierarchCatalog< entryType, paramType, orderType >::getDownEntryList | ( | unsigned int | idx | ) | const [inline] |
returns a list of the indices of entries below the one passed in
Definition at line 396 of file Catalog.h.
Referenced by RDCatalog::HierarchCatalog< entryType, paramType, orderType >::toStream().
| const RDKit::INT_VECT& RDCatalog::HierarchCatalog< entryType, paramType, orderType >::getEntriesOfOrder | ( | orderType | ord | ) | const [inline] |
| const RDKit::INT_VECT& RDCatalog::HierarchCatalog< entryType, paramType, orderType >::getEntriesOfOrder | ( | orderType | ord | ) | [inline] |
| const entryType* RDCatalog::HierarchCatalog< entryType, paramType, orderType >::getEntryWithBitId | ( | unsigned int | idx | ) | const [inline] |
returns a pointer to our entry with a particular bit ID
Definition at line 362 of file Catalog.h.
References RDCatalog::Catalog< entryType, paramType >::getFPLength(), and RDCatalog::HierarchCatalog< entryType, paramType, orderType >::getNumEntries().
| const entryType* RDCatalog::HierarchCatalog< entryType, paramType, orderType >::getEntryWithIdx | ( | unsigned int | idx | ) | const [inline, virtual] |
returns a pointer to our entry with a particular index
Implements RDCatalog::Catalog< entryType, paramType >.
Definition at line 352 of file Catalog.h.
References RDCatalog::HierarchCatalog< entryType, paramType, orderType >::getNumEntries().
Referenced by RDCatalog::HierarchCatalog< entryType, paramType, orderType >::toStream().
| int RDCatalog::HierarchCatalog< entryType, paramType, orderType >::getIdOfEntryWithBitId | ( | unsigned int | idx | ) | const [inline] |
returns the index of the entry with a particular bit ID
Definition at line 379 of file Catalog.h.
References RDCatalog::Catalog< entryType, paramType >::getFPLength(), and RDCatalog::HierarchCatalog< entryType, paramType, orderType >::getNumEntries().
| unsigned int RDCatalog::HierarchCatalog< entryType, paramType, orderType >::getNumEntries | ( | ) | const [inline, virtual] |
returns the number of entries
Implements RDCatalog::Catalog< entryType, paramType >.
Definition at line 278 of file Catalog.h.
Referenced by RDCatalog::HierarchCatalog< entryType, paramType, orderType >::addEdge(), RDCatalog::HierarchCatalog< entryType, paramType, orderType >::getEntryWithBitId(), RDCatalog::HierarchCatalog< entryType, paramType, orderType >::getEntryWithIdx(), RDCatalog::HierarchCatalog< entryType, paramType, orderType >::getIdOfEntryWithBitId(), and RDCatalog::HierarchCatalog< entryType, paramType, orderType >::toStream().
| void RDCatalog::HierarchCatalog< entryType, paramType, orderType >::initFromStream | ( | std::istream & | ss | ) | [inline] |
fills the contents of this object from a stream containing a pickle
Definition at line 231 of file Catalog.h.
References RDCatalog::HierarchCatalog< entryType, paramType, orderType >::addEdge(), RDCatalog::HierarchCatalog< entryType, paramType, orderType >::addEntry(), RDCatalog::Catalog< entryType, paramType >::setCatalogParams(), RDCatalog::Catalog< entryType, paramType >::setFPLength(), and RDKit::streamRead().
Referenced by RDCatalog::HierarchCatalog< entryType, paramType, orderType >::initFromString().
| void RDCatalog::HierarchCatalog< entryType, paramType, orderType >::initFromString | ( | const std::string & | text | ) | [inline] |
fills the contents of this object from a string containing a pickle
Definition at line 284 of file Catalog.h.
References RDCatalog::HierarchCatalog< entryType, paramType, orderType >::initFromStream().
| std::string RDCatalog::HierarchCatalog< entryType, paramType, orderType >::Serialize | ( | ) | const [inline, virtual] |
serializes this object and returns the resulting pickle
Implements RDCatalog::Catalog< entryType, paramType >.
Definition at line 223 of file Catalog.h.
References RDCatalog::HierarchCatalog< entryType, paramType, orderType >::toStream().
| void RDCatalog::HierarchCatalog< entryType, paramType, orderType >::toStream | ( | std::ostream & | ss | ) | const [inline] |
serializes this object to a stream
Definition at line 177 of file Catalog.h.
References RDCatalog::endianId, RDCatalog::Catalog< entryType, paramType >::getCatalogParams(), RDCatalog::HierarchCatalog< entryType, paramType, orderType >::getDownEntryList(), RDCatalog::HierarchCatalog< entryType, paramType, orderType >::getEntryWithIdx(), RDCatalog::Catalog< entryType, paramType >::getFPLength(), RDCatalog::HierarchCatalog< entryType, paramType, orderType >::getNumEntries(), RDKit::streamWrite(), RDCatalog::versionMajor, RDCatalog::versionMinor, and RDCatalog::versionPatch.
Referenced by RDCatalog::HierarchCatalog< entryType, paramType, orderType >::Serialize().
1.6.3