classifier.gp
Class Terminal

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

public abstract class Terminal
extends GProgram

Defines a type of gprogram, terminal nodes

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

Constructor Summary
Terminal()
           
 
Method Summary
(package private)  int countNodes()
          count all the nodes under this object
(package private)  int countNodes(Condition cond)
          count the nodes of the desidered kind
 
Methods inherited from class classifier.gp.GProgram
clone, eval, eval, eval, eval, getName, getSubtree, indent, maxDepthOfTree, toString, Walk
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Terminal

public Terminal()
Method Detail

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