OpenCog Framework  Branch: master, revision 6f0b7fc776b08468cf1b74aa9db028f387b4f0c0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Implicator.h
Go to the documentation of this file.
1 /*
2  * Implicator.h
3  *
4  * Copyright (C) 2009, 2014 Linas Vepstas
5  *
6  * Author: Linas Vepstas <linasvepstas@gmail.com> January 2009
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU Affero General Public License v3 as
10  * published by the Free Software Foundation and including the exceptions
11  * at http://opencog.org/wiki/Licenses
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU Affero General Public License
19  * along with this program; if not, write to:
20  * Free Software Foundation, Inc.,
21  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22  */
23 
24 #ifndef _OPENCOG_IMPLICATOR_H
25 #define _OPENCOG_IMPLICATOR_H
26 
27 #include <vector>
28 
30 
33 
34 
35 namespace opencog {
36 
54 class Implicator :
55  public virtual PatternMatchCallback
56 {
57  protected:
61 
62  public:
64  max_results(SIZE_MAX) {}
67  size_t max_results;
68 
69  virtual bool grounding(const std::map<Handle, Handle> &var_soln,
70  const std::map<Handle, Handle> &term_soln);
71 
72  virtual void insert_result(const Handle&);
74  virtual HandleSeq get_result_list();
75 };
76 
77 }; // namespace opencog
78 
79 #endif // _OPENCOG_IMPLICATOR_H
std::vector< Handle > HandleSeq
a list of handles
Definition: Handle.h:246
Instantiator inst
Definition: Implicator.h:65
virtual UnorderedHandleSet get_result_set()
Definition: Implicator.h:73
HandleSeq _result_list
Definition: Implicator.h:59
virtual void insert_result(const Handle &)
Definition: Implicator.cc:57
Implicator(AtomSpace *as)
Definition: Implicator.h:63
virtual bool grounding(const std::map< Handle, Handle > &var_soln, const std::map< Handle, Handle > &term_soln)
Definition: Implicator.cc:44
std::unordered_set< Handle, handle_hash > UnorderedHandleSet
a hash that associates the handle to its unique identificator
Definition: Handle.h:250
UnorderedHandleSet _result_set
Definition: Implicator.h:58
virtual HandleSeq get_result_list()
Definition: Implicator.cc:72