public abstract class EvoChromManipulatorBO<H extends Chromosome<C>,C> extends Object
| Modifier and Type | Field and Description |
|---|---|
protected BitMutationType |
bitMutationType |
protected ReflectionProvider<H> |
chromosomeRF |
protected int |
codeSize |
protected Double |
pertrubMutationStrength |
| Constructor and Description |
|---|
EvoChromManipulatorBO(ReflectionProvider<H> chromosomeRF,
int codeSize,
BitMutationType bitMutationType) |
EvoChromManipulatorBO(ReflectionProvider<H> chromosomeRF,
int codeSize,
BitMutationType bitMutationType,
Double pertrubMutationStrength) |
| Modifier and Type | Method and Description |
|---|---|
H |
cloneChromosome(H chromosome) |
protected abstract C |
createBlankCode() |
protected H |
createNewChromosome() |
abstract Collection<H> |
crossOverShuffle(H parent1,
H parent2,
int firstParentPositionNum)
Performs the cross over operation on given parents producing two new offsprings.
|
abstract Collection<H> |
crossOverSplit(H parent1,
H parent2,
int position)
Performs the cross over operation on given parents producing two new offsprings.
|
abstract H |
generateRandomChromosome()
Creates new test samples and discard old if any.
|
abstract void |
mutateBySwapping(H chromosome) |
abstract void |
mutateOneBit(H chromosome) |
abstract void |
mutatePerBit(H chromosome,
double mutationPerBitProbability) |
abstract void |
mutateTwoBits(H chromosome) |
protected final ReflectionProvider<H extends Chromosome<C>> chromosomeRF
protected final int codeSize
protected BitMutationType bitMutationType
protected Double pertrubMutationStrength
public EvoChromManipulatorBO(ReflectionProvider<H> chromosomeRF, int codeSize, BitMutationType bitMutationType)
public EvoChromManipulatorBO(ReflectionProvider<H> chromosomeRF, int codeSize, BitMutationType bitMutationType, Double pertrubMutationStrength)
protected abstract C createBlankCode()
public abstract H generateRandomChromosome()
public abstract Collection<H> crossOverSplit(H parent1, H parent2, int position)
parent1 - The first parentparent2 - The second parentposition - The position in the chromosome code where crossover is executedpublic abstract Collection<H> crossOverShuffle(H parent1, H parent2, int firstParentPositionNum)
parent1 - The first parentparent2 - The second parentfirstParentPositionNum - The position in the chromosome code where crossover is executedpublic abstract void mutatePerBit(H chromosome, double mutationPerBitProbability)
public abstract void mutateOneBit(H chromosome)
public abstract void mutateTwoBits(H chromosome)
public abstract void mutateBySwapping(H chromosome)
protected H createNewChromosome()
Copyright © 2019. All Rights Reserved.