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

#include <VarGroundingPMCB.h>

+ Inheritance diagram for opencog::VarGroundingPMCB:
+ Collaboration diagram for opencog::VarGroundingPMCB:

Public Member Functions

 VarGroundingPMCB (AtomSpace *as)
 
virtual ~VarGroundingPMCB ()
 
virtual bool grounding (const std::map< Handle, Handle > &var_soln, const std::map< Handle, Handle > &term_soln)
 
- Public Member Functions inherited from opencog::DefaultImplicator
 DefaultImplicator (AtomSpace *asp)
 
virtual void set_pattern (const Variables &vars, const Pattern &pat)
 
- Public Member Functions inherited from opencog::Implicator
 Implicator (AtomSpace *as)
 
virtual void insert_result (const Handle &)
 
virtual UnorderedHandleSet get_result_set ()
 
virtual HandleSeq get_result_list ()
 
- Public Member Functions inherited from opencog::PatternMatchCallback
virtual ~PatternMatchCallback ()
 
virtual bool fuzzy_match (const Handle &ph, const Handle &gh)
 
virtual IncomingSet get_incoming_set (const Handle &h)
 
virtual void push (void)
 
virtual void pop (void)
 
- Public Member Functions inherited from opencog::InitiateSearchCB
 InitiateSearchCB (AtomSpace *)
 
virtual bool initiate_search (PatternMatchEngine *)
 
- Public Member Functions inherited from opencog::DefaultPatternMatchCB
 DefaultPatternMatchCB (AtomSpace *)
 
virtual bool node_match (const Handle &, const Handle &)
 
virtual bool variable_match (const Handle &, const Handle &)
 
virtual bool link_match (const LinkPtr &, const LinkPtr &)
 
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 Attributes

std::vector< std::map< Handle,
Handle > > 
var_groundings
 
std::vector< std::map< Handle,
Handle > > 
term_groundings
 
- Public Attributes inherited from opencog::Implicator
Instantiator inst
 
Handle implicand
 
size_t max_results
 

Additional Inherited Members

- Protected Member Functions inherited from opencog::InitiateSearchCB
virtual Handle find_starter (const Handle &, size_t &, Handle &, size_t &)
 
virtual Handle find_thinnest (const HandleSeq &, const std::set< Handle > &, Handle &, size_t &)
 
virtual void find_rarest (const Handle &, Handle &, size_t &)
 
virtual bool neighbor_search (PatternMatchEngine *)
 
virtual bool link_type_search (PatternMatchEngine *)
 
virtual bool variable_search (PatternMatchEngine *)
 
virtual bool no_search (PatternMatchEngine *)
 
- 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::Implicator
UnorderedHandleSet _result_set
 
HandleSeq _result_list
 
bool _result_changed
 
- Protected Attributes inherited from opencog::InitiateSearchCB
ClassServer_classserver
 
const Variables_variables
 
const Pattern_pattern
 
const VariableTypeMap_type_restrictions
 
const std::set< Handle > * _dynamic
 
Handle _root
 
Handle _starter_term
 
bool _search_fail
 
AtomSpace_as
 
- 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

It just holds all var_grounding and term_grounding maps of the entire PM process.

Definition at line 35 of file VarGroundingPMCB.h.

Constructor & Destructor Documentation

opencog::VarGroundingPMCB::VarGroundingPMCB ( AtomSpace as)
inline

Definition at line 37 of file VarGroundingPMCB.h.

virtual opencog::VarGroundingPMCB::~VarGroundingPMCB ( )
inlinevirtual

Definition at line 43 of file VarGroundingPMCB.h.

Member Function Documentation

virtual bool opencog::VarGroundingPMCB::grounding ( const std::map< Handle, Handle > &  var_soln,
const std::map< Handle, Handle > &  term_soln 
)
inlinevirtual

This callback takes the reported grounding, runs it through the instantiator, to create the implicand, and then records the result in the public member result_set. If the number of results so far is less than max_results, it then returns false, to search for more groundings. (The engine will halt its search for a grounding once an acceptable one has been found; so, to continue hunting for more, we return false here. We want to find all possible groundings.)

Reimplemented from opencog::Implicator.

Definition at line 45 of file VarGroundingPMCB.h.

References term_groundings, and var_groundings.

Member Data Documentation

std::vector<std::map<Handle, Handle> > opencog::VarGroundingPMCB::term_groundings

Definition at line 56 of file VarGroundingPMCB.h.

std::vector<std::map<Handle, Handle> > opencog::VarGroundingPMCB::var_groundings

Definition at line 55 of file VarGroundingPMCB.h.


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