public class TreeRewriteAlterer<A,G extends TreeGene<A,G>,C extends Comparable<? super C>> extends TreeMutator<A,G,C>
TreeRewriter
for altering the TreeChromosome
.TreeRewriter
_probability
DEFAULT_ALTER_PROBABILITY
Constructor and Description |
---|
TreeRewriteAlterer(TreeRewriter<A> rewriter)
Create a new alterer with the given
rewriter . |
TreeRewriteAlterer(TreeRewriter<A> rewriter,
double probability)
Create a new alterer with the given
rewriter . |
TreeRewriteAlterer(TreeRewriter<A> rewriter,
int limit)
Create a new alterer with the given
rewriter and given rewrite
limit . |
TreeRewriteAlterer(TreeRewriter<A> rewriter,
int limit,
double probability)
Create a new alterer with the given
rewriter and given rewrite
limit . |
Modifier and Type | Method and Description |
---|---|
protected void |
mutate(TreeNode<A> tree)
Performs the actual tree rewriting.
|
mutate
getProbability
public TreeRewriteAlterer(TreeRewriter<A> rewriter, int limit, double probability)
rewriter
and given rewrite
limit
.rewriter
- the tree rewriterlimit
- the rewriting limitprobability
- the altering probabilityNullPointerException
- if the rewriter
is null
public TreeRewriteAlterer(TreeRewriter<A> rewriter, int limit)
rewriter
and given rewrite
limit
.rewriter
- the tree rewriterlimit
- the rewriting limitNullPointerException
- if the rewriter
is null
public TreeRewriteAlterer(TreeRewriter<A> rewriter, double probability)
rewriter
.rewriter
- the tree rewriterprobability
- the altering probabilityNullPointerException
- if the rewriter
is null
public TreeRewriteAlterer(TreeRewriter<A> rewriter)
rewriter
.rewriter
- the tree rewriterNullPointerException
- if the rewriter
is null
© 2007-2019 Franz Wilhelmstötter (2019-11-18 20:30)