44#include "environment.h"
45#include "tpg/tpgAction.h"
46#include "tpg/tpgEdge.h"
47#include "tpg/tpgFactory.h"
48#include "tpg/tpgTeam.h"
49#include "tpg/tpgVertex.h"
50#include "util/genericComparator.h"
67 std::unique_ptr<TPGFactory> f = std::make_unique<TPGFactory>())
169 const std::vector<const TPGVertex*>
getVertices()
const;
266 const std::shared_ptr<Program::Program> prog);
285 const TPGVertex& src,
const std::shared_ptr<Program::Program> prog,
286 uint64_t actionClass);
The Environment class contains all information needed to execute a Program.
Definition environment.h:86
Class representing an Action of a TPGGraph.
Definition tpgAction.h:55
Class representing edges of the Tangled Program Graphs.
Definition tpgEdge.h:54
Factory for creating all elements constituting a TPG.
Definition tpgFactory.h:71
Class for storing a Tangled-Program-Graph.
Definition tpgGraph.h:58
const std::vector< const TPGVertex * > getVertices() const
Get vector of const pointer to the vertices of the TPGGraph.
Definition tpgGraph.cpp:114
void clear()
Empty the TPGGraph of all its content.
Definition tpgGraph.cpp:57
const TPGEdge & cloneEdge(const TPGEdge &edge)
Definition tpgGraph.cpp:400
const TPGTeam & addNewTeam()
Create a new TPGTeam and add it to the vertices of the TPGGraph.
Definition tpgGraph.cpp:97
TPGGraph(const Environment &e, std::unique_ptr< TPGFactory > f=std::make_unique< TPGFactory >())
Main TPGGraph constructor.
Definition tpgGraph.h:66
void setNewEdgeID(const TPG::TPGEdge &edge, uint64_t newID)
Set a new ID to an edge.
Definition tpgGraph.cpp:253
const std::unique_ptr< TPGFactory > factory
TPGFactory of the TPGGraph.
Definition tpgGraph.h:437
std::set< std::unique_ptr< TPGVertex >, UniqueLess< TPGVertex > > vertices
Set of all vertices currently used in the graph.
Definition tpgGraph.h:447
const TPGEdge & addNewEdge(const TPGVertex &src, const TPGVertex &dest, const std::shared_ptr< Program::Program > prog)
Add a new TPGEdge to the TPGGraph.
Definition tpgGraph.cpp:276
bool setEdgeSource(const TPGEdge &edge, const TPGVertex &newSrc)
Change the source of the TPGEdge to the given vertex.
Definition tpgGraph.cpp:450
TPGGraph(TPGGraph &&model) noexcept
TPGGraph move assignment operator.
Definition tpgGraph.h:82
const TPGEdge & addNewActionEdge(const TPGVertex &src, const std::shared_ptr< Program::Program > prog, uint64_t actionClass)
Add a new TPGActionEdge to the TPGGraph.
Definition tpgGraph.cpp:310
TPGGraph & operator=(TPGGraph model)
assignement operator for class TPGGraph
Definition tpgGraph.cpp:51
void orderActionEdges(const TPG::TPGAction *action)
Definition tpgGraph.cpp:541
std::set< std::unique_ptr< TPGEdge >, UniqueLess< TPGEdge > > edges
Set of all edges currently used in the graph.
Definition tpgGraph.h:442
TPGGraph(const TPGGraph &model)=delete
delete copy constructor
bool hasVertex(const TPG::TPGVertex &vertex) const
Check whether a given vertex exists in the TPGGraph.
Definition tpgGraph.cpp:169
const TPGFactory & getFactory() const
Get a reference to the TPGFactory of the TPGGraph.
Definition tpgGraph.cpp:68
const std::vector< const TPGVertex * > getRootVertices() const
Get vector of const pointer to the root vertices of the TPGGraph.
Definition tpgGraph.cpp:158
void removeActionEdge(const TPGEdge &edge)
Remove a TPGActionEdge from the TPGGraph.
Definition tpgGraph.cpp:382
virtual ~TPGGraph()
Destructor for the TPGGraph.
Definition tpgGraph.cpp:46
const Environment & env
Environment of the TPGGraph.
Definition tpgGraph.h:434
size_t getNbVertices() const
Get the number of TPGVertex contained in the TPGGraph.
Definition tpgGraph.cpp:109
void removeEdge(const TPGEdge &edge)
Remove a TPGEdge from the TPGGraph.
Definition tpgGraph.cpp:347
void setActionClassEdge(const TPGEdge *edge, uint64_t newActionClass)
set a new action class to a TPGActionEdge
Definition tpgGraph.cpp:482
void removeVertex(const TPGVertex &vertex)
Remove a TPGVertex from the TPGGraph and destroy it.
Definition tpgGraph.cpp:177
void clearProgramIntrons()
Clear all intron instructions in the Program of the TPGGraph.
Definition tpgGraph.cpp:475
void updateAllAssessedActions()
Definition tpgGraph.cpp:529
void updateAssessedActions(const TPG::TPGVertex *vertex)
Definition tpgGraph.cpp:501
const TPGVertex & cloneVertex(const TPGVertex &vertex)
Clone a TPGVertex of the graph and all its outgoing TPGEdge.
Definition tpgGraph.cpp:205
const std::vector< const TPGAction * > getRootActions() const
Get vector of const pointer to the root actions of the TPGGraph.
Definition tpgGraph.cpp:134
friend void swap(TPGGraph &a, TPGGraph &b)
Helper function for move constructor.
Definition tpgGraph.h:92
const Environment & getEnvironment() const
Accessor to the Environment of the TPGGraph.
Definition tpgGraph.cpp:63
bool setEdgeDestination(const TPGEdge &edge, const TPGVertex &newDest)
Change the destination of the Edge to the given target.
Definition tpgGraph.cpp:422
const std::set< std::unique_ptr< TPG::TPGEdge >, UniqueLess< TPG::TPGEdge > > & getEdges() const
Get a const reference to the edges of the TPGGraph.
Definition tpgGraph.cpp:342
const TPGAction & addNewAction(uint64_t actionID)
Create a new TPGAction and add it to the vertices of the TPGGraph.
Definition tpgGraph.cpp:103
void setNewVertexID(const TPG::TPGVertex &vertex, uint64_t newID)
Set a new ID to a vertex.
Definition tpgGraph.cpp:73
uint64_t getNbRootVertices() const
Get the number of rootVertices of the TPGGraph.
Definition tpgGraph.cpp:126
const std::vector< const TPGTeam * > getRootTeams() const
Get vector of const pointer to the root teams of the TPGGraph.
Definition tpgGraph.cpp:146
Abstract class representing the vertices of a TPGGraph.
Definition tpgVertex.h:55
Definition executionStats.h:44
A comparator for unique_ptr that compares the pointed-to values.
Definition genericComparator.h:42