OpenCog Framework  Branch: master, revision 6f0b7fc776b08468cf1b74aa9db028f387b4f0c0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
opencog::LinkIndex Class Reference

#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< HandleSeqIndexidx
 

Detailed Description

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.

Constructor & Destructor Documentation

LinkIndex::LinkIndex ( void  )

Definition at line 32 of file LinkIndex.cc.

References resize().

Member Function Documentation

Handle LinkIndex::getHandle ( Type  type,
const HandleSeq seq 
) const

Definition at line 71 of file LinkIndex.cc.

References opencog::HandleSeqIndex::get(), idx, and python.undocumented.blocksworld::t.

+ Here is the caller graph for this function:

UnorderedHandleSet LinkIndex::getHandleSet ( Type  type,
const HandleSeq seq,
bool  subclass 
) const
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.

+ Here is the caller graph for this function:

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.

+ Here is the caller graph for this function:

void LinkIndex::resize ( )

Definition at line 37 of file LinkIndex.cc.

References opencog::classserver(), and idx.

+ Here is the caller graph for this function:

size_t LinkIndex::size ( void  ) const

Definition at line 42 of file LinkIndex.cc.

References idx.

+ Here is the caller graph for this function:

Member Data Documentation

std::vector<HandleSeqIndex> opencog::LinkIndex::idx
private

Definition at line 46 of file LinkIndex.h.


The documentation for this class was generated from the following files: