org.vizzini.ai.geneticprogramming.terminal
Class InputTerminal

java.lang.Object
  extended by org.vizzini.util.tree.AbstractTreeNode
      extended by org.vizzini.ai.geneticprogramming.AbstractNode
          extended by org.vizzini.ai.geneticprogramming.terminal.AbstractTerminal
              extended by org.vizzini.ai.geneticprogramming.terminal.InputTerminal
All Implemented Interfaces:
Cloneable, INode, ITerminal, ITreeNode, IVisitable

public class InputTerminal
extends AbstractTerminal

Provides a state variable terminal in genetic programming. An instance of this class obtains its evaluation from an input variable in the current fitness case.

Since:
v0.3
Version:
v0.3
Author:
Jeffrey M. Thompson

Constructor Summary
InputTerminal(String name, Class returnType)
          Construct this object with the given parameter.
 
Method Summary
 Object evaluate(IContext context)
          Evaluate this function.
 Class getReturnType()
          Return the type of the return value.
protected  void setReturnType(Class returnType)
           
 
Methods inherited from class org.vizzini.ai.geneticprogramming.terminal.AbstractTerminal
toString
 
Methods inherited from class org.vizzini.ai.geneticprogramming.AbstractNode
createNewInstance, dotLabel, dotLinkDesc, equals, getName, hashCode, setName
 
Methods inherited from class org.vizzini.util.tree.AbstractTreeNode
acceptBreadthFirst, acceptDepthFirst, add, breadthFirstIterator, children, clone, createTreeNodeCollection, depthFirstIterator, dotDesc, fillCollectionBreadthFirst, fillCollectionChildren, fillCollectionDepthFirst, getBreadthFirstList, getChildAt, getChildCount, getChildren, getDepth, getDepthFirstList, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLevel, getNextSibling, getNodeCount, getParent, getPath, getRoot, getTreeNodeCollectionClass, getUserObject, insert, isChildAllowed, isLeaf, isRoot, remove, remove, removeAllChildren, removeFromParent, setChildAllowed, setChildren, setParent, setTreeNodeCollectionClass, setUserObject
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.vizzini.ai.geneticprogramming.INode
createNewInstance, getName, setName
 
Methods inherited from interface org.vizzini.util.tree.ITreeNode
add, breadthFirstIterator, children, clone, depthFirstIterator, getBreadthFirstList, getChildAt, getChildCount, getDepth, getDepthFirstList, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLevel, getNextSibling, getNodeCount, getParent, getPath, getRoot, getUserObject, insert, isChildAllowed, isLeaf, isRoot, remove, remove, removeAllChildren, removeFromParent, setChildAllowed, setParent, setUserObject
 
Methods inherited from interface org.vizzini.util.tree.IVisitable
acceptBreadthFirst, acceptDepthFirst
 

Constructor Detail

InputTerminal

public InputTerminal(String name,
                     Class returnType)
Construct this object with the given parameter.

Parameters:
name - Name.
returnType - Return type.
Since:
v0.3
Method Detail

evaluate

public Object evaluate(IContext context)
Evaluate this function.

Parameters:
context - Context in which to evaluate.
Since:
v0.3

getReturnType

public Class getReturnType()
Description copied from interface: INode
Return the type of the return value.

Returns:
Return returnType.
Since:
v0.3

setReturnType

protected void setReturnType(Class returnType)
Parameters:
returnType - the returnType to set
Since:
v0.3


Copyright 2007 Vizzini.org. All Rights Reserved. 2007.12.25.03.00.02