OpenCog Framework  Branch: master, revision 6f0b7fc776b08468cf1b74aa9db028f387b4f0c0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
AttentionalFocusCB.h
Go to the documentation of this file.
1 /*
2  * AttentionalFocusCB.h
3  *
4  * Copyright (C) 2014 Misgana Bayetta
5  *
6  * Author: Misgana Bayetta <misgana.bayetta@gmail.com> July 2014
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 #ifndef _ATTENTIONAL_FOCUS_CB_H
24 #define _ATTENTIONAL_FOCUS_CB_H
25 
26 #include "DefaultPatternMatchCB.h"
27 
28 namespace opencog {
29 
31 {
32 private:
33  static bool compare_sti(LinkPtr lptr1, LinkPtr lptr2)
34  {
35  return lptr1->getSTI() > lptr2->getSTI();
36  }
37 public:
39 
40  // Only match nodes if they are in the attentional focus
41  bool node_match(const Handle&, const Handle&);
42 
43  // Only match links if they are in the attentional focus
44  bool link_match(const LinkPtr&, const LinkPtr&);
45 
46  // Only get incoming sets that are in the attentional focus
48 };
49 
50 } //namespace opencog
51 #endif /* _ATTENTIONALFOCUSCB_H */
std::shared_ptr< Link > LinkPtr
Definition: Atom.h:53
IncomingSet get_incoming_set(const Handle &)
std::vector< LinkPtr > IncomingSet
Definition: Atom.h:55
bool node_match(const Handle &, const Handle &)
bool link_match(const LinkPtr &, const LinkPtr &)
static bool compare_sti(LinkPtr lptr1, LinkPtr lptr2)