GEGELATI

Loading...
Searching...
No Matches
tpgMutator.h
1
37#ifndef TPG_MUTATOR_H
38#define TPG_MUTATOR_H
39
40#include <thread>
41
42#include "archive.h"
43#include "mutator/mutationParameters.h"
44#include "tpg/tpgGraph.h"
45
46 namespace Mutator {
47 namespace TPGMutator {
48
58 const TPG::TPGAction* initActionVertex(
59 TPG::TPGGraph& graph, const Mutator::MutationParameters& params,
60 Mutator::RNG& rng, uint64_t nbActionEdgeInit, uint64_t actionID);
61
91 void initRandomTPG(TPG::TPGGraph& graph,
92 const MutationParameters& params, Mutator::RNG& rng,
93 uint64_t nbAction);
94
103 void removeRandomActionEdge(TPG::TPGGraph& graph,
104 const TPG::TPGAction& action,
105 Mutator::RNG& rng);
106
117 void addRandomActionEdge(
118 TPG::TPGGraph& graph, const TPG::TPGAction& action,
119 const std::list<const TPG::TPGEdge*>& preExistingActionEdges,
120 Mutator::RNG& rng);
121
130 void swapActionEdges(TPG::TPGGraph& graph, const TPG::TPGAction& action,
131 Mutator::RNG& rng);
132
145 void mutateTPGActionEdge(
146 TPG::TPGGraph& graph, const TPG::TPGAction& action,
147 TPG::TPGActionEdge* actionEdge,
148 std::list<std::shared_ptr<Program::Program>>& newPrograms,
149 const Mutator::MutationParameters& params, Mutator::RNG& rng);
150
168 void mutateTPGAction(
169 TPG::TPGGraph& graph, const TPG::TPGAction& action,
170 std::list<const TPG::TPGEdge*> preExistingEdges,
171 std::list<std::shared_ptr<Program::Program>>& newPrograms,
172 const Mutator::MutationParameters& params, Mutator::RNG& rng);
173
182 void removeRandomEdge(TPG::TPGGraph& graph, const TPG::TPGTeam& team,
183 Mutator::RNG& rng);
184
203 void addRandomEdge(
204 TPG::TPGGraph& graph, const TPG::TPGTeam& team,
205 const std::list<const TPG::TPGEdge*>& preExistingEdges,
206 Mutator::RNG& rng);
207
232 void mutateEdgeDestination(
233 TPG::TPGGraph& graph, const TPG::TPGEdge* edge,
234 const std::vector<const TPG::TPGTeam*>& preExistingTeams,
235 const std::vector<const TPG::TPGAction*>& preExistingActions,
236 const Mutator::MutationParameters& params, Mutator::RNG& rng);
237
261 void mutateOutgoingEdge(
262 TPG::TPGGraph& graph, const TPG::TPGEdge* edge,
263 const std::vector<const TPG::TPGTeam*>& preExistingTeams,
264 const std::vector<const TPG::TPGAction*>& preExistingActions,
265 const std::list<const TPG::TPGEdge*>& preExistingEdges,
266 std::list<std::shared_ptr<Program::Program>>& newPrograms,
267 const Mutator::MutationParameters& params, Mutator::RNG& rng);
268
299 void mutateTPGTeam(
300 TPG::TPGGraph& graph, const Archive& archive,
301 const TPG::TPGTeam& team,
302 const std::vector<const TPG::TPGTeam*>& preExistingTeams,
303 const std::vector<const TPG::TPGAction*>& preExistingActions,
304 const std::list<const TPG::TPGEdge*>& preExistingEdges,
305 std::list<std::shared_ptr<Program::Program>>& newPrograms,
306 const Mutator::MutationParameters& params, Mutator::RNG& rng);
307
318 void mutateProgramBehaviorAgainstArchive(
319 std::shared_ptr<Program::Program>& newProg,
320 const Mutator::MutationParameters& params, const Archive& archive,
321 Mutator::RNG& rng);
322
336 void mutateNewProgramBehaviors(
337 const uint64_t& maxNbThreads,
338 std::list<std::shared_ptr<Program::Program>>& newPrograms,
339 Mutator::RNG& rng, const Mutator::MutationParameters& params,
340 const Archive& archive);
341
355 void updateClonableAndExistingVertexForTournament(
356 std::vector<const TPG::TPGTeam*>& teamsClonable,
357 std::vector<const TPG::TPGAction*>& actionsClonable,
358 std::vector<const TPG::TPGTeam*>& preExistingTeams,
359 std::vector<const TPG::TPGAction*>& preExistingActions);
360
391 void populateTPG(
392 TPG::TPGGraph& graph, const Archive& archive,
393 const Mutator::MutationParameters& params, Mutator::RNG& rng,
394 uint64_t nbActions,
395 uint64_t maxNbThreads = std::thread::hardware_concurrency());
396 }; // namespace TPGMutator
397}; // namespace Mutator
398
399#endif
Archive
Definition archive.h:80
Mutator::RNG
Definition rng.h:52
TPG::TPGActionEdge
Class representing ActionEdges of the Tangled Program Graphs.
Definition tpgActionEdge.h:61
TPG::TPGAction
Class representing an Action of a TPGGraph.
Definition tpgAction.h:55
TPG::TPGEdge
Class representing edges of the Tangled Program Graphs.
Definition tpgEdge.h:54
TPG::TPGGraph
Class for storing a Tangled-Program-Graph.
Definition tpgGraph.h:58
TPG::TPGTeam
Definition tpgTeam.h:49
Mutator
Definition deterministicRandom.h:44
Mutator::MutationParameters
struct Mutator::MutationParameters MutationParameters
Structure holding all parameters affecting stochastic mutations.
Mutator::MutationParameters
Structure holding all parameters affecting stochastic mutations.
Definition mutationParameters.h:315