Package io.jenetics.ext
Class TreeMutator<A,G extends TreeGene<A,G>,C extends Comparable<? super C>>
- java.lang.Object
-
- io.jenetics.AbstractAlterer<G,C>
-
- io.jenetics.Mutator<G,C>
-
- io.jenetics.ext.TreeMutator<A,G,C>
-
- All Implemented Interfaces:
Alterer<G,C>
- Direct Known Subclasses:
TreeRewriteAlterer
public abstract class TreeMutator<A,G extends TreeGene<A,G>,C extends Comparable<? super C>> extends Mutator<G,C>
Abstract class for mutating tree chromosomes.- Since:
- 4.1
- Version:
- 4.1
-
-
Field Summary
-
Fields inherited from class io.jenetics.AbstractAlterer
_probability
-
Fields inherited from interface io.jenetics.Alterer
DEFAULT_ALTER_PROBABILITY
-
-
Constructor Summary
Constructors Constructor Description TreeMutator()
TreeMutator(double probability)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected MutatorResult<Chromosome<G>>
mutate(Chromosome<G> chromosome, double p, Random random)
Mutates the given chromosome.protected abstract void
mutate(TreeNode<A> tree)
This method does the actual mutating, in place.-
Methods inherited from class io.jenetics.AbstractAlterer
probability
-
-
-
-
Constructor Detail
-
TreeMutator
public TreeMutator()
-
TreeMutator
public TreeMutator(double probability)
-
-
Method Detail
-
mutate
protected MutatorResult<Chromosome<G>> mutate(Chromosome<G> chromosome, double p, Random random)
Mutates the given chromosome.
-
-