GEGELATI
tpgExecutionEngine.h
1
37#ifndef TPG_EXECUTION_ENGINE_H
38#define TPG_EXECUTION_ENGINE_H
39
40#include <set>
41#include <vector>
42
43#include "archive.h"
44#include "program/programExecutionEngine.h"
45
46#include "tpg/tpgGraph.h"
47
48namespace TPG {
56 {
57 protected:
62
70
71 public:
82 TPGExecutionEngine(const Environment& env, Archive* arch = NULL)
83 : progExecutionEngine(env), archive{arch} {};
84
86 virtual ~TPGExecutionEngine() = default;
87
93 void setArchive(Archive* newArchive);
94
106 virtual double evaluateEdge(const TPGEdge& edge);
107
131 virtual const TPG::TPGEdge& evaluateTeam(
132 const TPGTeam& team, const std::vector<const TPGVertex*>& excluded);
133
145 virtual const std::vector<const TPGVertex*> executeFromRoot(
146 const TPGVertex& root);
147 };
148}; // namespace TPG
149
150#endif
Definition: archive.h:80
The Environment class contains all information needed to execute a Program.
Definition: environment.h:84
Class in charge of executing a Program within its Environment.
Definition: programExecutionEngine.h:53
Class representing edges of the Tangled Program Graphs.
Definition: tpgEdge.h:51
Definition: tpgExecutionEngine.h:56
virtual const std::vector< const TPGVertex * > executeFromRoot(const TPGVertex &root)
Execute the TPGGraph starting from the given TPGVertex.
Definition: tpgExecutionEngine.cpp:120
virtual ~TPGExecutionEngine()=default
Default virtual destructor.
virtual double evaluateEdge(const TPGEdge &edge)
Execute the Program associated to an Edge and returns the obtained double.
Definition: tpgExecutionEngine.cpp:51
virtual const TPG::TPGEdge & evaluateTeam(const TPGTeam &team, const std::vector< const TPGVertex * > &excluded)
Evaluate all the Program of the outgoing TPGEdge of the TPGTeam.
Definition: tpgExecutionEngine.cpp:71
TPGExecutionEngine(const Environment &env, Archive *arch=NULL)
Main constructor of the class.
Definition: tpgExecutionEngine.h:82
Program::ProgramExecutionEngine progExecutionEngine
ProgramExecutionEngine for executing Programs of edges.
Definition: tpgExecutionEngine.h:69
Archive * archive
Archive for recording Program results.
Definition: tpgExecutionEngine.h:61
void setArchive(Archive *newArchive)
Set a new Archive for storing Program results.
Definition: tpgExecutionEngine.cpp:46
Definition: tpgTeam.h:48
Abstract class representing the vertices of a TPGGraph.
Definition: tpgVertex.h:49
Definition: tpgActionInstrumented.h:8