org.encog.ml.prg
Class ProgramNode
java.lang.Object
org.encog.ml.tree.basic.BasicTreeNode
org.encog.ml.prg.ProgramNode
- All Implemented Interfaces:
- Serializable, TreeNode
public class ProgramNode
- extends BasicTreeNode
- implements Serializable
Represents a program node in an EPL program.
- See Also:
- Serialized Form
ProgramNode
public ProgramNode(EncogProgram theOwner,
ProgramExtensionTemplate theTemplate,
ProgramNode[] theArgs)
- Construct the program node.
- Parameters:
theOwner
- The owner of the node.theTemplate
- The opcode that this node is based on.theArgs
- The child nodes to this node.
allConstChildren
public boolean allConstChildren()
- Returns:
- True if all children are constant.
allConstDescendants
public boolean allConstDescendants()
- Returns:
- True if all descendants are constant.
evaluate
public ExpressionValue evaluate()
- Returns:
- The evaluated value of this node.
getChildNode
public ProgramNode getChildNode(int index)
- Get the specified child node.
- Parameters:
index
- The index of this node.
- Returns:
- The child node requested.
getData
public ExpressionValue[] getData()
- Returns:
- The node data.
getName
public String getName()
- Returns:
- The name of this node (from the opcode template).
getOwner
public EncogProgram getOwner()
- Returns:
- The EncogProgram that owns this node.
getTemplate
public ProgramExtensionTemplate getTemplate()
- Returns:
- the template
isVariable
public boolean isVariable()
- Returns:
- Returns true if this node's value is variable.
toString
public String toString()
-
- Overrides:
toString
in class Object
Copyright © 2014. All Rights Reserved.