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

#include <AttentionalFocusCB.h>

+ Inheritance diagram for opencog::AttentionalFocusCB:
+ Collaboration diagram for opencog::AttentionalFocusCB:

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 &)
 
- Public Member Functions inherited from opencog::DefaultPatternMatchCB
 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)
 
- Public Member Functions inherited from opencog::PatternMatchCallback
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

- Protected Member Functions inherited from opencog::DefaultPatternMatchCB
bool eval_term (const Handle &pat, const std::map< Handle, Handle > &gnds)
 
bool eval_sentence (const Handle &pat, const std::map< Handle, Handle > &gnds)
 
- Protected Attributes inherited from opencog::DefaultPatternMatchCB
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
 

Detailed Description

Definition at line 30 of file AttentionalFocusCB.h.

Constructor & Destructor Documentation

AttentionalFocusCB::AttentionalFocusCB ( AtomSpace as)

Definition at line 35 of file AttentionalFocusCB.cc.

Member Function Documentation

static bool opencog::AttentionalFocusCB::compare_sti ( LinkPtr  lptr1,
LinkPtr  lptr2 
)
inlinestaticprivate

Definition at line 33 of file AttentionalFocusCB.h.

+ Here is the caller graph for this function:

IncomingSet AttentionalFocusCB::get_incoming_set ( const Handle h)
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().

bool AttentionalFocusCB::link_match ( const LinkPtr lpat,
const LinkPtr lsoln 
)
virtual

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().

bool AttentionalFocusCB::node_match ( const Handle npat_h,
const Handle nsoln_h 
)
virtual

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().


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