|
OpenCog Framework
Branch: master, revision 6f0b7fc776b08468cf1b74aa9db028f387b4f0c0
|
#include <Rule.h>
Inheritance diagram for opencog::Rule:
Collaboration diagram for opencog::Rule:Public Member Functions | |
| Rule (Handle rule) | |
| bool | operator== (const Rule &r) const |
| bool | operator< (const Rule &r) const |
| void | set_handle (Handle h) throw (InvalidParamException) |
| void | set_name (const string &name) |
| void | set_category (const string &name) |
| void | set_weight (float p) |
| string & | get_name () |
| const string & | get_name () const |
| string & | get_category () |
| const string & | get_category () const |
| Handle | get_handle () |
| Handle | get_vardecl () |
| Handle | get_implicant () |
| HandleSeq | get_implicant_seq () |
| Handle | get_implicand () |
| HandleSeq | get_implicand_seq () |
| float | get_weight () |
| Rule | gen_standardize_apart (AtomSpace *as) |
Private Member Functions | |
| Handle | standardize_helper (AtomSpace *as, Handle, std::map< Handle, Handle > &) |
Private Attributes | |
| Handle | rule_handle_ |
| string | name_ |
| string | category_ |
| float | weight_ |
| Rule::Rule | ( | Handle | rule | ) |
Definition at line 37 of file Rule.cc.
References category_, opencog::DefineLink::get_definition(), opencog::Atom::getTruthValue(), opencog::Atom::isType(), opencog::LinkCast(), name_, opencog::NodeCast(), rule_handle_, opencog::Atom::toString(), and weight_.
Create a new rule where all variables are renamed.
| as | pointer to the atomspace where the new BindLink will be added |
Definition at line 220 of file Rule.cc.
References rule_handle_, set_handle(), and standardize_helper().
Here is the caller graph for this function:| const string & Rule::get_category | ( | ) | const |
| Handle Rule::get_handle | ( | ) |
Definition at line 93 of file Rule.cc.
References rule_handle_.
Here is the caller graph for this function:| Handle Rule::get_implicand | ( | void | ) |
Get the implicand (output) of the rule defined in a BindLink.
Definition at line 146 of file Rule.cc.
References opencog::BindLinkCast(), rule_handle_, and opencog::Handle::UNDEFINED.
Here is the caller graph for this function:| HandleSeq Rule::get_implicand_seq | ( | ) |
Get the implicand (output) of the rule defined in a BindLink.
This function does extra processing to find the real output over an ExecutionOutputLink. ie, skip to the ListLink under the ExLink.
Definition at line 163 of file Rule.cc.
References opencog::BindLinkCast(), opencog::Atom::getType(), opencog::LinkCast(), rule_handle_, and opencog::Handle::UNDEFINED.
Here is the caller graph for this function:| Handle Rule::get_implicant | ( | ) |
Get the implicant (input) of the rule defined in a BindLink.
Definition at line 113 of file Rule.cc.
References opencog::BindLinkCast(), rule_handle_, and opencog::Handle::UNDEFINED.
Here is the caller graph for this function:| HandleSeq Rule::get_implicant_seq | ( | ) |
Get the set of members of the implicant which are connected by a root logical link.
Definition at line 128 of file Rule.cc.
References get_implicant(), opencog::Atom::getType(), opencog::LinkCast(), and python.undocumented.blocksworld::t.
Here is the caller graph for this function:| string & Rule::get_name | ( | void | ) |
| const string & Rule::get_name | ( | void | ) | const |
| Handle Rule::get_vardecl | ( | ) |
Get the typed variable list of the Rule.
Definition at line 103 of file Rule.cc.
References opencog::LinkCast(), and rule_handle_.
Here is the caller graph for this function:
|
inline |
|
inline |
Definition at line 51 of file Rule.h.
References rule_handle_.
| void Rule::set_category | ( | const string & | name | ) |
| void Rule::set_handle | ( | Handle | h | ) | |
| throw | ( | InvalidParamException | |||
| ) | |||||
|
private |
Basic helper function to standardize apart the BindLink.
| as | pointer to an atomspace where new atoms are added |
| h | an input atom to standardize apart |
| dict | a mapping of old VariableNode and new VariableNode |
Definition at line 240 of file Rule.cc.
References opencog::AtomSpace::add_atom(), createLink, createNode, opencog::Atom::getTruthValue(), opencog::Atom::getType(), opencog::LinkCast(), opencog::NodeCast(), and rule_handle_.
Here is the caller graph for this function: