Class SimplificationRules

java.lang.Object
net.bmahe.genetics4j.gp.math.SimplificationRules

public class SimplificationRules extends Object
  • Field Details

    • logger

      public static final org.apache.logging.log4j.Logger logger
    • DEFAULT_EPSILON

      public static final double DEFAULT_EPSILON
      See Also:
    • ADD_TWO_COEFFCIENTS

      public static final Rule ADD_TWO_COEFFCIENTS
    • MUL_TWO_COEFFICIENTS

      public static final Rule MUL_TWO_COEFFICIENTS
    • SUB_TWO_COEFFICIENTS

      public static final Rule SUB_TWO_COEFFICIENTS
    • SUB_INPUT_FROM_SAME_INPUT

      public static final Rule SUB_INPUT_FROM_SAME_INPUT
    • SUB_ZERO_FROM_INPUT

      public static final Rule SUB_ZERO_FROM_INPUT
    • DIV_TWO_COEFFICIENT_FINITE

      public static final Rule DIV_TWO_COEFFICIENT_FINITE
    • ADD_INPUT_TO_SAME_INPUT

      public static final Rule ADD_INPUT_TO_SAME_INPUT
    • MULTIPLY_INPUT_WITH_SAME_INPUT

      public static final Rule MULTIPLY_INPUT_WITH_SAME_INPUT
    • MULTIPLY_INPUT_WITH_EXP_SAME_INPUT_COEFF

      public static final Rule MULTIPLY_INPUT_WITH_EXP_SAME_INPUT_COEFF
    • MUL_1_WITH_ANYTHING

      public static final Rule MUL_1_WITH_ANYTHING
    • MUL_ANYTHING_WITH_1

      public static final Rule MUL_ANYTHING_WITH_1
    • ADD_0_WITH_ANYTHING

      public static final Rule ADD_0_WITH_ANYTHING
    • ADD_ANYTHING_WITH_0

      public static final Rule ADD_ANYTHING_WITH_0
    • MUL_0_WITH_ANYTHING

      public static final Rule MUL_0_WITH_ANYTHING
    • MUL_ANYTHING_WITH_0

      public static final Rule MUL_ANYTHING_WITH_0
    • POW_0

      public static final Rule POW_0
    • POW_1

      public static final Rule POW_1
    • COS_OF_COEFFICIENT

      public static final Rule COS_OF_COEFFICIENT
    • SIN_OF_COEFFICIENT

      public static final Rule SIN_OF_COEFFICIENT
    • SUB_SAME_BRANCHES

      public static final Rule SUB_SAME_BRANCHES
    • ADD_SAME_BRANCHES

      public static final Rule ADD_SAME_BRANCHES
    • DIV_SAME_BRANCHES

      public static final Rule DIV_SAME_BRANCHES
    • EXP_OF_COEFFICIENT

      public static final Rule EXP_OF_COEFFICIENT
    • POW_TWO_COEFFICIENTS

      public static final Rule POW_TWO_COEFFICIENTS
    • MUL_SAME_BRANCHES

      public static final Rule MUL_SAME_BRANCHES
      multiplication of the same branch -> square of the first branch
    • COS_PI

      public static final Rule COS_PI
    • SIN_PI

      public static final Rule SIN_PI
    • SIMPLIFY_RULES

      public static final List<Rule> SIMPLIFY_RULES
  • Constructor Details

    • SimplificationRules

      public SimplificationRules()
  • Method Details

    • isOperation

      protected static boolean isOperation(TreeNode<Operation<?>> node, String name)
    • hasChildOperation

      protected static boolean hasChildOperation(TreeNode<Operation<?>> node, int childIndex, String name)
    • getChildAs

      protected static <T> T getChildAs(TreeNode<Operation<?>> node, int childIndex, Class<T> clazz)
    • isEqual

      protected static boolean isEqual(double v1, double v2, double epsilon)
    • isEqual

      protected static boolean isEqual(double v1, double v2)