OpenCog Framework
Branch: master, revision 6f0b7fc776b08468cf1b74aa9db028f387b4f0c0
|
#include <UREConfigReader.h>
Classes | |
class | RuleBaseParameters |
Public Member Functions | |
UREConfigReader (AtomSpace &as, Handle rbs) | |
const std::vector< Rule > & | get_rules () const |
std::vector< Rule > & | get_rules () |
bool | get_attention_allocation () const |
int | get_maximum_iterations () const |
void | set_attention_allocation (bool) |
void | set_maximum_iterations (int) |
Static Public Attributes | |
static const std::string | top_rbs_name = "URE" |
static const std::string | attention_alloc_name = "URE:attention-allocation" |
static const std::string | max_iter_name = "URE:maximum-iterations" |
Private Member Functions | |
HandleSeq | fetch_rules (Handle rbs) |
HandleSeq | fetch_execution_outputs (Handle schema, Handle input, Type type=ATOM) |
double | fetch_num_param (const std::string &schema_name, Handle input) |
bool | fetch_bool_param (const std::string &pred_name, Handle input) |
Private Attributes | |
AtomSpace & | _as |
RuleBaseParameters | _rbparams |
Read the URE configuration in the AtomSpace as described in http://wiki.opencog.org/w/URE_Configuration_Format, and provide parameter accessors for all rule-based systems.
Definition at line 44 of file UREConfigReader.h.
Definition at line 36 of file UREConfigReader.cc.
References _rbparams, opencog::UREConfigReader::RuleBaseParameters::attention_alloc, attention_alloc_name, fetch_bool_param(), fetch_num_param(), fetch_rules(), opencog::UREConfigReader::RuleBaseParameters::max_iter, max_iter_name, opencog::UREConfigReader::RuleBaseParameters::rules, and opencog::Handle::UNDEFINED.
|
private |
Definition at line 151 of file UREConfigReader.cc.
References _as, opencog::AtomSpace::add_link(), opencog::AtomSpace::add_node(), opencog::Atom::getTruthValue(), and tv.
|
private |
Definition at line 98 of file UREConfigReader.cc.
References _as, opencog::AtomSpace::add_link(), opencog::AtomSpace::add_node(), opencog::classserver(), opencog::LinkCast(), opencog::remove_hypergraph(), and opencog::satisfying_set().
|
private |
Definition at line 128 of file UREConfigReader.cc.
References _as, opencog::AtomSpace::add_node(), opencog::classserver(), fetch_execution_outputs(), opencog::Atom::getType(), opencog::ClassServer::getTypeName(), opencog::NodeCast(), and opencog::NumberNodeCast().
Definition at line 83 of file UREConfigReader.cc.
References _as, opencog::AtomSpace::add_link(), opencog::AtomSpace::add_node(), opencog::bindlink(), opencog::LinkCast(), and opencog::remove_hypergraph().
bool UREConfigReader::get_attention_allocation | ( | ) | const |
Definition at line 63 of file UREConfigReader.cc.
References _rbparams, and opencog::UREConfigReader::RuleBaseParameters::attention_alloc.
int UREConfigReader::get_maximum_iterations | ( | ) | const |
Definition at line 68 of file UREConfigReader.cc.
References _rbparams, and opencog::UREConfigReader::RuleBaseParameters::max_iter.
const std::vector< Rule > & UREConfigReader::get_rules | ( | ) | const |
Definition at line 53 of file UREConfigReader.cc.
References _rbparams, and opencog::UREConfigReader::RuleBaseParameters::rules.
std::vector< Rule > & UREConfigReader::get_rules | ( | ) |
Definition at line 58 of file UREConfigReader.cc.
References _rbparams, and opencog::UREConfigReader::RuleBaseParameters::rules.
void UREConfigReader::set_attention_allocation | ( | bool | aa | ) |
Definition at line 73 of file UREConfigReader.cc.
References _rbparams, and opencog::UREConfigReader::RuleBaseParameters::attention_alloc.
void UREConfigReader::set_maximum_iterations | ( | int | mi | ) |
Definition at line 78 of file UREConfigReader.cc.
References _rbparams, and opencog::UREConfigReader::RuleBaseParameters::max_iter.
|
private |
Definition at line 85 of file UREConfigReader.h.
|
private |
Definition at line 93 of file UREConfigReader.h.
|
static |
Definition at line 70 of file UREConfigReader.h.
|
static |
Definition at line 74 of file UREConfigReader.h.
|
static |
Definition at line 66 of file UREConfigReader.h.