org.vizzini.ai.geneticprogramming.function
Class AbstractSequenceFunction
java.lang.Object
org.vizzini.util.tree.AbstractTreeNode
org.vizzini.ai.geneticprogramming.AbstractNode
org.vizzini.ai.geneticprogramming.function.AbstractFunction
org.vizzini.ai.geneticprogramming.function.AbstractSequenceFunction
- All Implemented Interfaces:
- Cloneable, IFunction, INode, ITreeNode, IVisitable
- Direct Known Subclasses:
- Sequence1Function, Sequence2Function, Sequence3Function
public abstract class AbstractSequenceFunction
- extends AbstractFunction
Provides base functionality for a sequence function in genetic programming.
- Since:
- v0.3
- Version:
- v0.3
- Author:
- Jeffrey M. Thompson
Methods inherited from class org.vizzini.util.tree.AbstractTreeNode |
acceptBreadthFirst, acceptDepthFirst, breadthFirstIterator, children, clone, 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 interface org.vizzini.util.tree.ITreeNode |
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 |
AbstractSequenceFunction
public AbstractSequenceFunction(int argCount,
Class argType,
Class returnType)
- Construct this object.
- Since:
- v0.3
evaluate
public Object evaluate(IContext context)
- Evaluate this function.
- Parameters:
context
- Context in which to evaluate.- Since:
- v0.3
getArgCount
public int getArgCount()
- Return the number of arguments used by this function.
- Since:
- v0.3
getArgType
public Class getArgType()
- Returns:
- Return argType.
- Since:
- v0.3
getArgType
public Class getArgType(int index)
- Return the type of the argument at the given index.
- Parameters:
index
- Argument index.- Since:
- v0.3
getReturnType
public Class getReturnType()
- Return the type of the return value.
- Since:
- v0.3
setArgCount
public void setArgCount(int argCount)
- Parameters:
argCount
- the argCount to set- Since:
- v0.3
setArgType
public void setArgType(Class argType)
- Parameters:
argType
- the argType to set- Since:
- v0.3
setReturnType
public 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 |