Class Function

java.lang.Object
org.episteme.core.mathematics.optimization.evolutionary.geneticprogramming.Program
org.episteme.core.mathematics.optimization.evolutionary.geneticprogramming.Function
All Implemented Interfaces:
Cloneable

public abstract class Function extends Program
Abstraction for the functions in genetic programming.
Version:
0.1
Author:
Levent Bayindir
  • Field Details

    • arg

      public Program[] arg
      The program which represents this function
  • Constructor Details

    • Function

      public Function()
  • Method Details

    • clone

      public Object clone()
      Returns a deep copy of this Function instance
      Specified by:
      clone in class Program
      Returns:
      deep copy of this function
    • countNodes

      public int countNodes()
      Returns the number of nodes this function has.
      Specified by:
      countNodes in class Program
      Returns:
      number of children nodes
    • countProgramNodes

      public int countProgramNodes()
      Returns the number of program nodes this function has. This method traverses all the children nodes recursively until the leaf nodes are reached and counts the number of programs.
      Specified by:
      countProgramNodes in class Program
      Returns:
      number of program nodes
    • countFunctionNodes

      public int countFunctionNodes()
      Returns the number of function nodes this function has. This method traverses all the children nodes recursively until the leaf nodes are reached and counts the number of functions.
      Specified by:
      countFunctionNodes in class Program
      Returns:
      number of function nodes
    • toText

      public String toText()
      Returns a string representation of this function. (Instead of toString - Used by Javolution)
      Specified by:
      toText in class Program
      Returns:
      string representation of this function