dignea  1.0.0
Diverse Instance Generator with Novelty Search and Evolutionary Algorithms
ScrambleMutation< S > Class Template Reference

Scramble Mutation Operator for Permutation Based Problems like TSP. Fixes the first and last genes to zero (TSP constraint). More...

#include <ScrambleMutation.h>

Inheritance diagram for ScrambleMutation< S >:
Mutation< S >

Public Member Functions

void run (S &ind, const double &probability, Problem< S > *) override
 Performs Scramble Mutation Operation. More...
 
std::string getName () const override
 

Detailed Description

template<class S>
class ScrambleMutation< S >

Scramble Mutation Operator for Permutation Based Problems like TSP. Fixes the first and last genes to zero (TSP constraint).

Template Parameters
S

Member Function Documentation

◆ run()

template<class S >
void ScrambleMutation< S >::run ( S &  ind,
const double &  probability,
Problem< S > *  problem 
)
overridevirtual

Performs Scramble Mutation Operation.

Two positions (genes) in the chromosome are selected at random and all the genes between the points are shuffled randomly

Template Parameters
S
Parameters
ind
probability
problem

Implements Mutation< S >.


The documentation for this class was generated from the following file: