|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.vizzini.util.tree.AbstractTreeNode
org.vizzini.ai.geneticprogramming.AbstractNode
org.vizzini.ai.geneticprogramming.function.AbstractFunction
org.vizzini.example.ant.IfFoodAheadFunction
public class IfFoodAheadFunction
Provides a function to determine if there is food in the cell ahead of the ant.
Constructor Summary | |
---|---|
IfFoodAheadFunction()
Construct this object. |
Method Summary | |
---|---|
Object |
evaluate(IContext context)
Evaluate this function. |
int |
getArgCount()
Return the number of arguments used by this function. |
Class |
getArgType(int index)
Return the type of the argument at the given index. |
Class |
getReturnType()
Return the type of the return value. |
protected boolean |
isFoodAhead(IContext context0)
Return true if there is food ahead of the ant. |
Methods inherited from class org.vizzini.ai.geneticprogramming.function.AbstractFunction |
---|
add, checkState, createTreeNodeCollection, isCheckingState, setCheckingState, toString |
Methods inherited from class org.vizzini.ai.geneticprogramming.AbstractNode |
---|
createNewInstance, dotLabel, dotLinkDesc, equals, getName, hashCode, setName |
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 |
---|
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 |
---|
public IfFoodAheadFunction()
Method Detail |
---|
public Object evaluate(IContext context)
context
- Context in which to evaluate.public int getArgCount()
public Class getArgType(int index)
index
- Argument index.public Class getReturnType()
protected boolean isFoodAhead(IContext context0)
context0
- Context.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2007 Vizzini.org. All Rights Reserved. | 2007.12.25.03.00.02 |