Package io.jenetics.prog
Class MathRewriteAlterer<G extends TreeGene<Op<Double>,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<Op<Double>,G,C>
-
- io.jenetics.prog.MathRewriteAlterer<G,C>
-
- All Implemented Interfaces:
Alterer<G,C>
public class MathRewriteAlterer<G extends TreeGene<Op<Double>,G>,C extends Comparable<? super C>> extends TreeRewriteAlterer<Op<Double>,G,C>
Prunes a given mathematical tree with the given alterer probability.- Since:
- 4.1
- Version:
- 5.0
- Author:
- Franz Wilhelmstötter
- See Also:
TreeRewriteAlterer
-
-
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 MathRewriteAlterer()Create a new alterer with the default math rewriterMathExpr.REWRITERand given rewrite.MathRewriteAlterer(double probability)Create a new alterer with the default math rewriterMathExpr.REWRITERand given rewrite.MathRewriteAlterer(TreeRewriter<Op<Double>> rewriter)Create a new alterer with the givenrewriter.MathRewriteAlterer(TreeRewriter<Op<Double>> rewriter, double probability)Create a new alterer with the givenrewriterand given rewritelimit.MathRewriteAlterer(TreeRewriter<Op<Double>> rewriter, int limit, double probability)Create a new alterer with the givenrewriterand given rewritelimit.
-
Method Summary
-
Methods inherited from class io.jenetics.ext.TreeRewriteAlterer
mutate
-
Methods inherited from class io.jenetics.ext.TreeMutator
mutate
-
Methods inherited from class io.jenetics.AbstractAlterer
probability
-
-
-
-
Constructor Detail
-
MathRewriteAlterer
public MathRewriteAlterer(TreeRewriter<Op<Double>> 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
-
MathRewriteAlterer
public MathRewriteAlterer(TreeRewriter<Op<Double>> rewriter, double probability)
Create a new alterer with the givenrewriterand given rewritelimit.- Parameters:
rewriter- the tree rewriterprobability- the altering probability- Throws:
NullPointerException- if therewriterisnull
-
MathRewriteAlterer
public MathRewriteAlterer(TreeRewriter<Op<Double>> rewriter)
Create a new alterer with the givenrewriter.- Parameters:
rewriter- the tree rewriter- Throws:
NullPointerException- if therewriterisnull
-
MathRewriteAlterer
public MathRewriteAlterer(double probability)
Create a new alterer with the default math rewriterMathExpr.REWRITERand given rewrite.- Parameters:
probability- the altering probability
-
MathRewriteAlterer
public MathRewriteAlterer()
Create a new alterer with the default math rewriterMathExpr.REWRITERand given rewrite.
-
-