Class TreeNodeUtils

java.lang.Object
net.bmahe.genetics4j.gp.utils.TreeNodeUtils

public class TreeNodeUtils extends Object
  • Field Details

  • Constructor Details

    • TreeNodeUtils

      private TreeNodeUtils()
  • Method Details

    • compare

      public static <T> int compare(TreeNode<Operation<T>> rootA, TreeNode<Operation<T>> rootB)
      Simple strict comparison.

      Does not take in account commutativity or rotations

      Type Parameters:
      T -
      Parameters:
      rootA -
      rootB -
      Returns:
    • compare

      public static <T> int compare(Genotype genotypeA, Genotype genotypeB, int chromosomeIndex)
    • areSame

      public static <T> boolean areSame(TreeNode<T> rootA, TreeNode<T> rootB)
    • areSame

      public static <T> boolean areSame(Genotype genotypeA, Genotype genotypeB, int chromosomeIndex)
    • toStringTreeNode

      public static String toStringTreeNode(TreeNode<Operation<?>> node)
    • toStringTreeNode

      public static String toStringTreeNode(Genotype genotype, int chromosomeIndex)