#include <inference_engine.h>
Public Member Functions | |
inference_engine (const gptr< work_node > &wnode, const std::string &__n) | |
virtual | ~inference_engine () |
virtual bool | update_engine (const gptr< work_node > &wnode) |
std::pair< std::list< delta_id > , std::list< delta_id > > | new_deltas () |
const delta * | get_delta (const delta_id &__d) const |
const model * | get_model () const |
virtual ie_return_type | infer (const control_data &__c) |
const std::string & | get_name () const |
virtual statistic_info | last_call_stat () |
virtual statistic_info | cumulative_stat () |
Protected Attributes | |
std::string | __name |
const gptr< work_node > * | __wnode |
const work_node_context * | __wnc |
const vdbl::viewdbase & | __vdb |
std::vector< delta_id > | _old_deltas |
std::vector< delta_id > | _new_deltas |
Definition at line 76 of file inference_engine.h.
coco::inference_engine::inference_engine | ( | const gptr< work_node > & | wnode, | |
const std::string & | __n | |||
) | [inline] |
This is the standard constructor for an inference_engine. It sets the indentifier string to n
and the work node to wnode
.
Definition at line 102 of file inference_engine.h.
virtual coco::inference_engine::~inference_engine | ( | ) | [inline, virtual] |
Standard Destructor
Definition at line 110 of file inference_engine.h.
virtual statistic_info coco::inference_engine::cumulative_stat | ( | ) | [inline, virtual] |
This method returns the cumulative statistics gathered through all calls of the infer method.
Definition at line 149 of file inference_engine.h.
The get_delta retrieves the delta with delta_id __d
.
Definition at line 126 of file inference_engine.h.
const model* coco::inference_engine::get_model | ( | ) | const [inline] |
A call to this method returns a pointer to the model of the work node.
Definition at line 130 of file inference_engine.h.
const std::string& coco::inference_engine::get_name | ( | ) | const [inline] |
The get_name method returns the identifier string of the inference engine.
Definition at line 142 of file inference_engine.h.
virtual ie_return_type coco::inference_engine::infer | ( | const control_data & | __c | ) | [inline, virtual] |
This method is the main method of an inference engine. It is supposed to analyze the work node and to return the information gained in the ie_return_type structure. This method is overloaded by the various subclasses. Service information and parameters are provided via the control_data structure __c
.
Definition at line 138 of file inference_engine.h.
virtual statistic_info coco::inference_engine::last_call_stat | ( | ) | [inline, virtual] |
This method returns the statistics gathered in the last call of the infer method.
Definition at line 146 of file inference_engine.h.
This method returns the deltas to be applied and unapplied for properly updating the inference engine.
Definition at line 51 of file inference_engine.cc.
virtual bool coco::inference_engine::update_engine | ( | const gptr< work_node > & | wnode | ) | [inline, virtual] |
This update_engine method changes the work node to wnode
.
Definition at line 113 of file inference_engine.h.
std::string coco::inference_engine::__name [protected] |
This is the identifier string for an inference engine.
Definition at line 80 of file inference_engine.h.
const vdbl::viewdbase& coco::inference_engine::__vdb [protected] |
This is a view to the search database.
Definition at line 87 of file inference_engine.h.
const work_node_context* coco::inference_engine::__wnc [protected] |
This is the work_node_context for extracting information from the search database.
Definition at line 85 of file inference_engine.h.
const gptr<work_node>* coco::inference_engine::__wnode [protected] |
This variable contains a global pointer to the work node.
Definition at line 82 of file inference_engine.h.
std::vector<delta_id> coco::inference_engine::_new_deltas [protected] |
This vector keeps the new deltas for updating an engine with a call to the update_engine method (these deltas need to be applied).
Definition at line 93 of file inference_engine.h.
std::vector<delta_id> coco::inference_engine::_old_deltas [protected] |
This vector keeps the old deltas for updating an engine with a call to the update_engine method (these deltas need to be unapplied).
Definition at line 90 of file inference_engine.h.