ac.essex.ooechs.ecj.ecj2java.example.terminals
Class X

java.lang.Object
  extended by ec.gp.GPNode
      extended by ac.essex.ooechs.ecj.ecj2java.nodes.ParseableGPNode
          extended by ac.essex.ooechs.ecj.ecj2java.example.terminals.X
All Implemented Interfaces:
ParseableNode, ec.gp.GPNodeParent, ec.Prototype, ec.Setup, java.io.Serializable, java.lang.Cloneable

public class X
extends ParseableGPNode

Allows the GP tree to access the variable X, from which it is supposed to calculate Y, in some manner.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version, provided that any use properly credits the author. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details at http://www.gnu.org

Version:
1.0
Author:
Olly Oechsle, University of Essex, Date: 05-Sep-2006
See Also:
Serialized Form

Field Summary
 
Fields inherited from class ec.gp.GPNode
argposition, children, constraints, GPNODEPRINTTAB, MAXPRINTBYTES, NODESEARCH_ALL, NODESEARCH_CUSTOM, NODESEARCH_NONTERMINALS, NODESEARCH_TERMINALS, P_NODE, P_NODECONSTRAINTS, parent, REPLACEMENT_CHAR, SITUATION_MUTATION, SITUATION_NEWIND
 
Fields inherited from interface ac.essex.ooechs.ecj.ecj2java.nodes.ParseableNode
BOOLEAN, DOUBLE, ERC, FUNCTION, INT, RETURN, VOID
 
Constructor Summary
X()
           
 
Method Summary
 void eval(ec.EvolutionState state, int thread, ec.gp.GPData input, ec.gp.ADFStack stack, ec.gp.GPIndividual individual, ec.Problem problem)
          Called as the function is evaluated.
 java.lang.String getJavaCode()
          Convert this code to pure Java
 int getObjectType()
          The kind of object this is, eg int, double, etc.
 
Methods inherited from class ac.essex.ooechs.ecj.ecj2java.nodes.ParseableGPNode
checkConstraints, countChildren, getChild, getEndJavaCode, getLineComment, getType, getValue, getVariableName, setType, setVariableName, toString
 
Methods inherited from class ec.gp.GPNode
atDepth, cloneReplacing, cloneReplacing, cloneReplacing, cloneReplacingAtomic, cloneReplacingAtomic, cloneReplacingAtomicSimple, cloneReplacingAtomicSimple, cloneReplacingNoSubclone, cloneReplacingNoSubcloneSimple, cloneReplacingSimple, cloneReplacingSimple, cloneReplacingSimple, constraints, contains, defaultBase, depth, errorInfo, makeCTree, makeLatexTree, nodeEquals, nodeEquivalentTo, nodeHashCode, nodeInPosition, numNodes, numNodes, parentType, printNode, printNode, printNodeForHumans, printRootedTree, printRootedTree, printRootedTreeForHumans, protoClone, protoCloneSimple, readNode, readNode, readRootedTree, readRootedTree, replaceWith, resetNode, rootedTreeEquals, rootedTreeHashCode, rootParent, setup, swapCompatibleWith, toStringForError, toStringForHumans, writeNode, writeRootedTree
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

X

public X()
Method Detail

eval

public void eval(ec.EvolutionState state,
                 int thread,
                 ec.gp.GPData input,
                 ec.gp.ADFStack stack,
                 ec.gp.GPIndividual individual,
                 ec.Problem problem)
Called as the function is evaluated.

Specified by:
eval in class ec.gp.GPNode

getObjectType

public int getObjectType()
Description copied from interface: ParseableNode
The kind of object this is, eg int, double, etc.

Specified by:
getObjectType in interface ParseableNode
Specified by:
getObjectType in class ParseableGPNode

getJavaCode

public java.lang.String getJavaCode()
Convert this code to pure Java

Specified by:
getJavaCode in interface ParseableNode
Specified by:
getJavaCode in class ParseableGPNode