OpenCog Framework
Branch: master, revision 6f0b7fc776b08468cf1b74aa9db028f387b4f0c0
|
#include <EvaluationLink.h>
Static Public Member Functions | |
static TruthValuePtr | do_evaluate (AtomSpace *, Handle) |
static TruthValuePtr | do_evaluate (AtomSpace *, const HandleSeq &schema_and_args) |
static TruthValuePtr | do_evaluate (AtomSpace *, Handle schema, Handle args) |
Definition at line 35 of file EvaluationLink.h.
EvaluationLink::EvaluationLink | ( | const HandleSeq & | oset, |
TruthValuePtr | tv = TruthValue::NULL_TV() , |
||
AttentionValuePtr | av = AttentionValue::DEFAULT_AV() |
||
) |
Definition at line 34 of file EvaluationLink.cc.
References opencog::Atom::getType().
EvaluationLink::EvaluationLink | ( | Handle | schema, |
Handle | args, | ||
TruthValuePtr | tv = TruthValue::NULL_TV() , |
||
AttentionValuePtr | av = AttentionValue::DEFAULT_AV() |
||
) |
Definition at line 47 of file EvaluationLink.cc.
References opencog::Atom::getType().
EvaluationLink::EvaluationLink | ( | Link & | l | ) |
Definition at line 58 of file EvaluationLink.cc.
References opencog::Atom::getType().
|
static |
do_evaluate – evaluate the GroundedPredicateNode of the EvaluationLink
Expects the argument to be an EvaluationLink, which should have the following structure:
EvaluationLink GroundedPredicateNode "lang: func_name" ListLink SomeAtom OtherAtom
The "lang:" should be either "scm:" for scheme, or "py:" for python. This method will then invoke "func_name" on the provided ListLink of arguments to the function.
Definition at line 127 of file EvaluationLink.cc.
References opencog::SimpleTruthValue::createTV(), equal(), opencog::Atom::getType(), greater(), opencog::LinkCast(), python.undocumented.blocksworld::t, and tv.
|
static |
do_evaluate – evaluate the GroundedPredicateNode of the EvaluationLink
Expects the sequence to be exactly two atoms long. Expects the first handle of the sequence to be a GroundedPredicateNode Expects the second handle of the sequence to be a ListLink Executes the GroundedPredicateNode, supplying the second handle as argument
Definition at line 160 of file EvaluationLink.cc.
References do_evaluate().
|
static |
do_evaluate – evaluate the GroundedPredicateNode of the EvaluationLink
Expects "gsn" to be a GroundedPredicateNode Expects "args" to be a ListLink Executes the GroundedPredicateNode, supplying the args as argument
Definition at line 176 of file EvaluationLink.cc.
References opencog::SchemeEval::apply_tv(), opencog::PythonEval::apply_tv(), benchmark::args, opencog::TruthValue::FALSE_TV(), opencog::SchemeEval::get_evaluator(), opencog::Atom::getType(), greater(), opencog::PythonEval::instance(), opencog::LinkCast(), opencog::NodeCast(), and opencog::TruthValue::TRUE_TV().
|
inline |
Definition at line 48 of file EvaluationLink.h.
References do_evaluate(), and opencog::Atom::Handle.