public class TSPScrambleMutator extends Mutator<IntegerChromosome>
i1=0; i2=3 position: 0 1 2 3 4 5 start_chrom: 5 2 1 4 6 3 end_chrom: 2 5 4 1 6 3
Mutator.Statistics
probability
random, statistics
biggerIsBetter, fitness, ga
Constructor and Description |
---|
TSPScrambleMutator(double pMut) |
Modifier and Type | Method and Description |
---|---|
protected void |
mutate(Individual<IntegerChromosome> t)
Mutates a single individual.
|
void |
randomize(IntegerChromosome chrom,
int min,
int max)
Randomizes the elements chromosome within the range [min,max]
|
getProbability, process, setProbability
getStatistics, updateStatistics
dispose, getFitness, init, isBiggerBetter, isFitnessChanged, setBiggerIsBetter, setBiggerIsBetter, setFitness, setFitness
protected void mutate(Individual<IntegerChromosome> t)
Mutator
mutate
in class Mutator<IntegerChromosome>
t
- the individual to mutatepublic void randomize(IntegerChromosome chrom, int min, int max)
chrom
- the individual to mutatemin
- the lower boundmax
- the upper bound