OpenCog Framework
Branch: master, revision 6f0b7fc776b08468cf1b74aa9db028f387b4f0c0
|
#include <AttentionalFocusCB.h>
Public Member Functions | |
AttentionalFocusCB (AtomSpace *) | |
bool | node_match (const Handle &, const Handle &) |
bool | link_match (const LinkPtr &, const LinkPtr &) |
IncomingSet | get_incoming_set (const Handle &) |
![]() | |
DefaultPatternMatchCB (AtomSpace *) | |
virtual void | set_pattern (const Variables &, const Pattern &) |
virtual bool | variable_match (const Handle &, const Handle &) |
virtual bool | post_link_match (const LinkPtr &, const LinkPtr &) |
virtual bool | clause_match (const Handle &, const Handle &) |
virtual bool | optional_clause_match (const Handle &pattrn, const Handle &grnd) |
virtual bool | evaluate_sentence (const Handle &pat, const std::map< Handle, Handle > &gnds) |
virtual const std::set< Type > & | get_connectives (void) |
bool | optionals_present (void) |
![]() | |
virtual | ~PatternMatchCallback () |
virtual bool | fuzzy_match (const Handle &ph, const Handle &gh) |
virtual bool | grounding (const std::map< Handle, Handle > &var_soln, const std::map< Handle, Handle > &term_soln)=0 |
virtual void | push (void) |
virtual void | pop (void) |
virtual bool | initiate_search (PatternMatchEngine *)=0 |
Static Private Member Functions | |
static bool | compare_sti (LinkPtr lptr1, LinkPtr lptr2) |
Additional Inherited Members | |
![]() | |
bool | eval_term (const Handle &pat, const std::map< Handle, Handle > &gnds) |
bool | eval_sentence (const Handle &pat, const std::map< Handle, Handle > &gnds) |
![]() | |
ClassServer & | _classserver |
const VariableTypeMap * | _type_restrictions = NULL |
const std::set< Handle > * | _dynamic = NULL |
bool | _have_evaluatables = false |
AtomSpace | _temp_aspace |
Instantiator | _instor |
std::set< Type > | _connectives |
bool | _optionals_present = false |
AtomSpace * | _as |
Definition at line 30 of file AttentionalFocusCB.h.
AttentionalFocusCB::AttentionalFocusCB | ( | AtomSpace * | as | ) |
Definition at line 35 of file AttentionalFocusCB.cc.
|
virtual |
Called whenever the incoming set of an atom is to be explored. This callback allows the search space to be prioritized, by returning (all or some of) the incoming set in some sorted order: the first in the list will be searched first. The search space can also be limited, by returning a set that is smaller than the full incoming set (for example, by returning only those atoms with a high av-sti).
Reimplemented from opencog::PatternMatchCallback.
Definition at line 54 of file AttentionalFocusCB.cc.
References opencog::DefaultPatternMatchCB::_as, compare_sti(), opencog::AtomSpace::get_attentional_focus_boundary(), and opencog::Atom::getIncomingSet().
Called when a link in the template pattern needs to be compared to a possibly matching link in the atomspace. The first argument is a link from the pattern, and the second is a possible solution link from the atomspace. Return true if the links should be compared, else return false.
By default, the search continues if the link arity and the link types match.
Reimplemented from opencog::DefaultPatternMatchCB.
Definition at line 48 of file AttentionalFocusCB.cc.
References opencog::DefaultPatternMatchCB::_as, opencog::AtomSpace::get_attentional_focus_boundary(), and opencog::DefaultPatternMatchCB::link_match().
Called when a node in the template pattern needs to be compared to a possibly matching node in the atomspace. The first argument is a node from the pattern, and the second is a possible solution (grounding) node from the atomspace.
Return true if the nodes match, else return false. By default, the nodes must be identical.
Reimplemented from opencog::DefaultPatternMatchCB.
Definition at line 42 of file AttentionalFocusCB.cc.
References opencog::DefaultPatternMatchCB::_as, opencog::AtomSpace::get_attentional_focus_boundary(), and opencog::Atom::getSTI().