Class MathRewriteAlterer<G extends TreeGene<Op<Double>,G>,C extends Comparable<? super 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
See Also:
  • Constructor Details

    • MathRewriteAlterer

      public MathRewriteAlterer(TreeRewriter<Op<Double>> rewriter, int limit, double probability)
      Create a new alterer with the given rewriter and given rewrite limit.
      Parameters:
      rewriter - the tree rewriter
      limit - the rewriting limit
      probability - the altering probability
      Throws:
      NullPointerException - if the rewriter is null
    • MathRewriteAlterer

      public MathRewriteAlterer(TreeRewriter<Op<Double>> rewriter, double probability)
      Create a new alterer with the given rewriter and given rewrite limit.
      Parameters:
      rewriter - the tree rewriter
      probability - the altering probability
      Throws:
      NullPointerException - if the rewriter is null
    • MathRewriteAlterer

      Create a new alterer with the given rewriter.
      Parameters:
      rewriter - the tree rewriter
      Throws:
      NullPointerException - if the rewriter is null
    • MathRewriteAlterer

      public MathRewriteAlterer(double probability)
      Create a new alterer with the default math rewriter MathExpr.REWRITER and given rewrite.
      Parameters:
      probability - the altering probability
    • MathRewriteAlterer

      Create a new alterer with the default math rewriter MathExpr.REWRITER and given rewrite.