ec.app.gpsemantics.func
Class SemanticJ
- java.lang.Object
-
- ec.gp.GPNode
-
- ec.app.gpsemantics.func.SemanticNode
-
- ec.app.gpsemantics.func.SemanticJ
-
- All Implemented Interfaces:
- GPNodeParent, Prototype, Setup, java.io.Serializable, java.lang.Cloneable
public class SemanticJ extends SemanticNode
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class ec.gp.GPNode
argposition, children, CHILDREN_UNKNOWN, constraints, GPNODEPRINTTAB, MAXPRINTBYTES, NODESEARCH_ALL, NODESEARCH_NONTERMINALS, NODESEARCH_TERMINALS, P_NODE, P_NODECONSTRAINTS, parent
-
-
Constructor Summary
Constructors Constructor and Description SemanticJ()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description intexpectedChildren()Returns the number of children this node expects to have.intindex()java.lang.StringtoString()Returns a Lisp-like atom for the node which can be read in again by computer.charvalue()-
Methods inherited from class ec.app.gpsemantics.func.SemanticNode
eval
-
Methods inherited from class ec.gp.GPNode
atDepth, checkConstraints, clone, cloneReplacing, cloneReplacing, cloneReplacing, cloneReplacingAtomic, cloneReplacingAtomic, cloneReplacingNoSubclone, constraints, contains, defaultBase, depth, errorInfo, iterator, iterator, iterator, lightClone, makeCTree, makeGraphvizTree, makeLatexTree, makeLispTree, makeLispTree, name, nodeEquals, nodeEquivalentTo, nodeHashCode, nodeInPosition, nodeInPosition, numNodes, numNodes, parentType, pathLength, printNode, printNode, printNode, printNodeForHumans, printNodeForHumans, printRootedTree, printRootedTree, printRootedTree, printRootedTreeForHumans, printRootedTreeForHumans, readNode, readNode, readRootedTree, readRootedTree, replaceWith, resetNode, rootedTreeEquals, rootedTreeHashCode, rootParent, setup, swapCompatibleWith, toStringForError, toStringForHumans, writeNode, writeRootedTree
-
-
-
-
Method Detail
-
toString
public java.lang.String toString()
Description copied from class:GPNodeReturns a Lisp-like atom for the node which can be read in again by computer. If you need to encode an integer or a float or whatever for some reason (perhaps if it's an ERC), you should use the ec.util.Code library.- Overrides:
toStringin classSemanticNode
-
expectedChildren
public int expectedChildren()
Description copied from class:GPNodeReturns the number of children this node expects to have. This method is only called by the default implementation of checkConstraints(...), and by default it returns CHILDREN_UNKNOWN. You can override this method to return a value >= 0, which will be checked for in the default checkConstraints(...), or you can leave this method alone and override checkConstraints(...) to check for more complex constraints as you see fit.- Overrides:
expectedChildrenin classSemanticNode
-
index
public int index()
- Specified by:
indexin classSemanticNode
-
value
public char value()
- Specified by:
valuein classSemanticNode
-
-
DMelt 3.0 © DataMelt by jWork.ORG