Package org.opt4j.operator.mutate
Class MutateDouble
- java.lang.Object
-
- org.opt4j.operator.mutate.MutateDouble
-
- All Implemented Interfaces:
Operator<DoubleGenotype>,Mutate<DoubleGenotype>
- Direct Known Subclasses:
MutateDoubleElementwise
public abstract class MutateDouble extends Object implements Mutate<DoubleGenotype>
Mutate for theDoubleGenotype.
-
-
Field Summary
Fields Modifier and Type Field Description protected NormalizeDoublenormalizeprotected Randomrandom
-
Constructor Summary
Constructors Constructor Description MutateDouble(Rand random, NormalizeDouble normalize)Constructs aMutateDouble.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidmutate(DoubleGenotype genotype, double p)Performs a mutation for aGenotype.protected abstract voidmutateList(DoubleGenotype vector, double p)The mutate internal function.
-
-
-
Field Detail
-
random
protected final Random random
-
normalize
protected final NormalizeDouble normalize
-
-
Constructor Detail
-
MutateDouble
@Inject public MutateDouble(Rand random, NormalizeDouble normalize)
Constructs aMutateDouble.- Parameters:
random- the random number generatornormalize- the normalizer
-
-
Method Detail
-
mutate
public void mutate(DoubleGenotype genotype, double p)
Description copied from interface:MutatePerforms a mutation for aGenotype.- Specified by:
mutatein interfaceMutate<DoubleGenotype>- Parameters:
genotype- the genotype to be mutatedp- the mutation rate
-
mutateList
protected abstract void mutateList(DoubleGenotype vector, double p)
The mutate internal function.- Parameters:
vector- the vector of double valuesp- the mutation rate
-
-