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 aTreeRewriterfor altering theTreeChromosome.- Since:
- 5.0
- Version:
- 5.0
- See Also:
TreeRewriter
-
-
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 TreeRewriteAlterer(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidmutate(TreeNode<A> tree)Performs the actual tree rewriting.-
Methods inherited from class io.jenetics.ext.TreeMutator
mutate
-
Methods inherited from class io.jenetics.AbstractAlterer
probability
-
-
-
-
Constructor Detail
-
TreeRewriteAlterer
public TreeRewriteAlterer(TreeRewriter<A> rewriter, int limit, double probability)
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
public TreeRewriteAlterer(TreeRewriter<A> rewriter, int limit)
Create a new alterer with the givenrewriterand given rewritelimit.- Parameters:
rewriter- the tree rewriterlimit- the rewriting limit- Throws:
NullPointerException- if therewriterisnull
-
TreeRewriteAlterer
public TreeRewriteAlterer(TreeRewriter<A> rewriter, double probability)
Create a new alterer with the givenrewriter.- Parameters:
rewriter- the tree rewriterprobability- the altering probability- Throws:
NullPointerException- if therewriterisnull
-
TreeRewriteAlterer
public TreeRewriteAlterer(TreeRewriter<A> rewriter)
Create a new alterer with the givenrewriter.- Parameters:
rewriter- the tree rewriter- Throws:
NullPointerException- if therewriterisnull
-
-