OpenCog Framework
Branch: master, revision 6f0b7fc776b08468cf1b74aa9db028f387b4f0c0
|
#include <LinkIndex.h>
Public Member Functions | |
LinkIndex (void) | |
void | insertAtom (const AtomPtr &) |
void | removeAtom (const AtomPtr &) |
void | remove (bool(*)(const Handle &)) |
void | resize () |
size_t | size () const |
Handle | getHandle (Type type, const HandleSeq &) const |
UnorderedHandleSet | getHandleSet (Type type, const HandleSeq &, bool subclass) const |
Private Attributes | |
std::vector< HandleSeqIndex > | idx |
Implements an (type, HandleSeq) index array of RB-trees (C++ set) That is, given both a type, and a HandleSeq, it returns a single, unique Handle associated with that pair. In other words, it returns the single, unique Link which is that pair.
Definition at line 43 of file LinkIndex.h.
LinkIndex::LinkIndex | ( | void | ) |
Definition at line 32 of file LinkIndex.cc.
References resize().
Definition at line 71 of file LinkIndex.cc.
References opencog::HandleSeqIndex::get(), idx, and python.undocumented.blocksworld::t.
UnorderedHandleSet LinkIndex::getHandleSet | ( | Type | type, |
const HandleSeq & | seq, | ||
bool | subclass | ||
) | const |
Definition at line 85 of file LinkIndex.cc.
References opencog::classserver(), opencog::HandleSeqIndex::get(), getHandle(), opencog::ClassServer::getNumberOfClasses(), idx, and opencog::Handle::UNDEFINED.
void LinkIndex::insertAtom | ( | const AtomPtr & | a | ) |
Definition at line 49 of file LinkIndex.cc.
References idx, opencog::HandleSeqIndex::insert(), opencog::LinkCast(), and python.undocumented.blocksworld::t.
void LinkIndex::remove | ( | bool(*)(const Handle &) | filter | ) |
Definition at line 79 of file LinkIndex.cc.
References idx.
void LinkIndex::removeAtom | ( | const AtomPtr & | a | ) |
Definition at line 60 of file LinkIndex.cc.
References idx, opencog::LinkCast(), opencog::HandleSeqIndex::remove(), and python.undocumented.blocksworld::t.
void LinkIndex::resize | ( | ) |
Definition at line 37 of file LinkIndex.cc.
References opencog::classserver(), and idx.
size_t LinkIndex::size | ( | void | ) | const |
Definition at line 42 of file LinkIndex.cc.
References idx.
|
private |
Definition at line 46 of file LinkIndex.h.