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
Abstraction for the functions in genetic programming.
- Version:
- 0.1
- Author:
- Levent Bayindir
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()Returns a deep copy of this Function instanceintReturns the number of function nodes this function has.intReturns the number of nodes this function has.intReturns the number of program nodes this function has.toText()Returns a string representation of this function.
-
Field Details
-
arg
The program which represents this function
-
-
Constructor Details
-
Function
public Function()
-
-
Method Details
-
clone
-
countNodes
public int countNodes()Returns the number of nodes this function has.- Specified by:
countNodesin classProgram- 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:
countProgramNodesin classProgram- 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:
countFunctionNodesin classProgram- Returns:
- number of function nodes
-
toText
-