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
  • Constructor Details

  • Method Details

    • mutate

      protected MutatorResult<Chromosome<G>> mutate(Chromosome<G> chromosome, double p, RandomGenerator random)
      Mutates the given chromosome.
      Overrides:
      mutate in class Mutator<G extends TreeGene<A,G>,C extends Comparable<? super C>>
      Parameters:
      chromosome - the chromosome to mutate
      p - the mutation probability for the underlying genetic objects
      random - the random engine used for the genotype mutation
      Returns:
      the mutation result
    • mutate

      protected abstract void mutate(TreeNode<A> tree)
      This method does the actual mutating, in place.
      Parameters:
      tree - the mutable tree to mutate