Module io.jenetics.ext
Package io.jenetics.ext
Class TreeRewriteAlterer<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>
io.jenetics.ext.TreeRewriteAlterer<A,G,C>
- All Implemented Interfaces:
Alterer<G,C>
public class TreeRewriteAlterer<A,G extends TreeGene<A,G>,C extends Comparable<? super C>>
extends TreeMutator<A,G,C>
This alterer uses a
TreeRewriter for altering the TreeChromosome.- Since:
- 5.0
- Version:
- 5.0
- See Also:
-
Field Summary
Fields inherited from class io.jenetics.AbstractAlterer
_probabilityFields inherited from interface io.jenetics.Alterer
DEFAULT_ALTER_PROBABILITY -
Constructor Summary
ConstructorsConstructorDescriptionTreeRewriteAlterer(TreeRewriter<A> rewriter) Create a new alterer with the givenrewriter.TreeRewriteAlterer(TreeRewriter<A> rewriter, double probability) Create a new alterer with the givenrewriter.TreeRewriteAlterer(TreeRewriter<A> rewriter, int limit) Create a new alterer with the givenrewriterand given rewritelimit.TreeRewriteAlterer(TreeRewriter<A> rewriter, int limit, double probability) Create a new alterer with the givenrewriterand given rewritelimit. -
Method Summary
Methods inherited from class io.jenetics.ext.TreeMutator
mutateMethods inherited from class io.jenetics.AbstractAlterer
probability
-
Constructor Details
-
TreeRewriteAlterer
Create a new alterer with the givenrewriterand given rewritelimit.- Parameters:
rewriter- the tree rewriterlimit- the rewriting limitprobability- the altering probability- Throws:
NullPointerException- if therewriterisnull
-
TreeRewriteAlterer
Create a new alterer with the givenrewriterand given rewritelimit.- Parameters:
rewriter- the tree rewriterlimit- the rewriting limit- Throws:
NullPointerException- if therewriterisnull
-
TreeRewriteAlterer
Create a new alterer with the givenrewriter.- Parameters:
rewriter- the tree rewriterprobability- the altering probability- Throws:
NullPointerException- if therewriterisnull
-
TreeRewriteAlterer
Create a new alterer with the givenrewriter.- Parameters:
rewriter- the tree rewriter- Throws:
NullPointerException- if therewriterisnull
-
-
Method Details
-
mutate
Performs the actual tree rewriting.- Specified by:
mutatein classTreeMutator<A,G extends TreeGene<A, G>, C extends Comparable<? super C>> - Parameters:
tree- the tree to rewrite
-