org.encog.app.generate.program
Class EncogProgramNode
- java.lang.Object
-
- org.encog.app.generate.program.EncogTreeNode
-
- org.encog.app.generate.program.EncogProgramNode
-
public class EncogProgramNode extends EncogTreeNode
A node that holds a program.
-
-
Constructor Summary
Constructors Constructor and Description EncogProgramNode(EncogGenProgram theProgram, EncogTreeNode theParent, NodeType theNodeType, java.lang.String theName)Construct the program node.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidaddArg(double argValue)Add a double argument.voidaddArg(int argValue)Add an int argument.voidaddArg(java.lang.Object argValue)Add an object argument.voidaddArg(java.lang.String argValue)Add a string argument.EncogProgramNodecreateArray(java.lang.String name, double[] a)Create an array.EncogProgramNodecreateFunction(java.lang.String theName)Create a function.EncogProgramNodecreateFunctionCall(EncogProgramNode funct, java.lang.String returnType, java.lang.String returnVariable)Create a function call.EncogProgramNodecreateFunctionCall(java.lang.String name, java.lang.String returnType, java.lang.String returnVariable)Create a function call.EncogProgramNodecreateMainFunction()Create a new main function.EncogProgramNodecreateNetworkFunction(java.lang.String name, java.io.File method)Create a new network function.voiddefineConst(EncogArgType type, java.lang.String name, java.lang.String value)Define a const.EncogProgramNodeembedTraining(java.io.File data)Embed training data.EncogProgramNodegenerateLoadTraining(java.io.File data)Load the training data.java.util.List<EncogProgramArg>getArgs()java.lang.StringgetName()NodeTypegetType()-
Methods inherited from class org.encog.app.generate.program.EncogTreeNode
addComment, getChildren, getParent, getProgram, setProgram
-
-
-
-
Constructor Detail
-
EncogProgramNode
public EncogProgramNode(EncogGenProgram theProgram, EncogTreeNode theParent, NodeType theNodeType, java.lang.String theName)
Construct the program node.- Parameters:
theProgram- THe program.theParent- The parent.theNodeType- The node type.theName- The name of the node.
-
-
Method Detail
-
addArg
public void addArg(double argValue)
Add a double argument.- Parameters:
argValue- The argument value.
-
addArg
public void addArg(int argValue)
Add an int argument.- Parameters:
argValue- The argument value.
-
addArg
public void addArg(java.lang.Object argValue)
Add an object argument.- Parameters:
argValue- The argument value.
-
addArg
public void addArg(java.lang.String argValue)
Add a string argument.- Parameters:
argValue- The argument value.
-
createArray
public EncogProgramNode createArray(java.lang.String name, double[] a)
Create an array.- Parameters:
name- THe name of the array.a- The value to init the array to.- Returns:
- The newly creatred array.
-
createFunction
public EncogProgramNode createFunction(java.lang.String theName)
Create a function.- Parameters:
theName- The name of the function.- Returns:
- The newly created function.
-
createFunctionCall
public EncogProgramNode createFunctionCall(EncogProgramNode funct, java.lang.String returnType, java.lang.String returnVariable)
Create a function call.- Parameters:
funct- The function to call.returnType- The type returned.returnVariable- The value to assigne the function call to.- Returns:
- The newly created function call.
-
createFunctionCall
public EncogProgramNode createFunctionCall(java.lang.String name, java.lang.String returnType, java.lang.String returnVariable)
Create a function call.- Parameters:
name- The name of the function to call.returnType- The return type.returnVariable- The variable to assign the function to.- Returns:
- The newly created function call.
-
createMainFunction
public EncogProgramNode createMainFunction()
Create a new main function.- Returns:
- The newly created main function.
-
createNetworkFunction
public EncogProgramNode createNetworkFunction(java.lang.String name, java.io.File method)
Create a new network function.- Parameters:
name- The name of the network function.method- The method to call.- Returns:
- The newly created network function.
-
defineConst
public void defineConst(EncogArgType type, java.lang.String name, java.lang.String value)
Define a const.- Parameters:
type- The type of const.name- The name of the const.value- The value of the const.
-
embedTraining
public EncogProgramNode embedTraining(java.io.File data)
Embed training data.- Parameters:
data- The training data to embed.- Returns:
- The newly created embeded training data.
-
generateLoadTraining
public EncogProgramNode generateLoadTraining(java.io.File data)
Load the training data.- Parameters:
data- The data.- Returns:
- The newly created data load.
-
getArgs
public java.util.List<EncogProgramArg> getArgs()
- Returns:
- The args.
-
getName
public java.lang.String getName()
- Returns:
- The name.
-
getType
public NodeType getType()
- Returns:
- The type.
-
-
DMelt 3.0 © DataMelt by jWork.ORG