classifier.gp
Class Function

java.lang.Object
  extended byclassifier.gp.GProgram
      extended byclassifier.gp.Function
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public abstract class Function
extends GProgram

Defines a type of gprogram, function nodes

Version:
0.1
Author:
Sacchi Matteo, Sassi Federico
See Also:
Serialized Form

Field Summary
protected  GProgram[] arg
           
 
Constructor Summary
Function()
           
 
Method Summary
protected  java.lang.Object clone()
          clone this object
(package private)  int countNodes()
          count all the nodes under this object
(package private)  int countNodes(Condition cond)
          count the nodes of the desidered kind
 java.lang.String toString(int level)
          Prints the content of the tree from the level indicated
 
Methods inherited from class classifier.gp.GProgram
eval, eval, eval, eval, getName, getSubtree, indent, maxDepthOfTree, Walk
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

arg

protected GProgram[] arg
Constructor Detail

Function

public Function()
Method Detail

toString

public java.lang.String toString(int level)
Prints the content of the tree from the level indicated

Specified by:
toString in class GProgram
Parameters:
level - the level of the tree from which to start
Returns:
a string containg the content of the tree

clone

protected java.lang.Object clone()
clone this object

Specified by:
clone in class GProgram
Returns:
cloned object

countNodes

int countNodes()
count all the nodes under this object

Specified by:
countNodes in class GProgram
Returns:
the number of the nodes

countNodes

int countNodes(Condition cond)
count the nodes of the desidered kind

Specified by:
countNodes in class GProgram
Parameters:
cond - the desidered kind of nodes to be counted (eg. function or terminal)
Returns:
the number of the nodes