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, String theName)` Construct the program node.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addArg(double argValue)` Add a double argument.
    `void` | `addArg(int argValue)` Add an int argument.
    `void` | `addArg(Object argValue)` Add an object argument.
    `void` | `addArg(String argValue)` Add a string argument.
    `EncogProgramNode` | `createArray(String name, double[] a)` Create an array.
    `EncogProgramNode` | `createFunction(String theName)` Create a function.
    `EncogProgramNode` | `createFunctionCall(EncogProgramNode funct, String returnType, String returnVariable)` Create a function call.
    `EncogProgramNode` | `createFunctionCall(String name, String returnType, String returnVariable)` Create a function call.
    `EncogProgramNode` | `createMainFunction()` Create a new main function.
    `EncogProgramNode` | `createNetworkFunction(String name, File method)` Create a new network function.
    `void` | `defineConst(EncogArgType type, String name, String value)` Define a const.
    `EncogProgramNode` | `embedTraining(File data)` Embed training data.
    `EncogProgramNode` | `generateLoadTraining(File data)` Load the training data.
    `List<EncogProgramArg>` | `getArgs()`
    `String` | `getName()`
    `NodeType` | `getType()`

    - ### Methods inherited from class org.encog.app.generate.program.EncogTreeNode

      `addComment, getChildren, getParent, getProgram, setProgram`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### EncogProgramNode

          public EncogProgramNode(EncogGenProgram theProgram,
                          EncogTreeNode theParent,
                          NodeType theNodeType,
                          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(Object argValue)

      Add an object argument.
      Parameters:
        `argValue` - The argument value.

    - #### addArg

          public void addArg(String argValue)

      Add a string argument.
      Parameters:
        `argValue` - The argument value.

    - #### createArray

          public EncogProgramNode createArray(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(String theName)

      Create a function.
      Parameters:
        `theName` - The name of the function.
      Returns:
        The newly created function.

    - #### createFunctionCall

          public EncogProgramNode createFunctionCall(EncogProgramNode funct,
                                            String returnType,
                                            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(String name,
                                            String returnType,
                                            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(String name,
                                               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,
                         String name,
                         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(File data)

      Embed training data.
      Parameters:
        `data` - The training data to embed.
      Returns:
        The newly created embeded training data.

    - #### generateLoadTraining

          public EncogProgramNode generateLoadTraining(File data)

      Load the training data.
      Parameters:
        `data` - The data.
      Returns:
        The newly created data load.

    - #### getArgs

          public List<EncogProgramArg> getArgs()

      Returns:
        The args.

    - #### getName

          public String getName()

      Returns:
        The name.

    - #### getType

          public NodeType getType()

      Returns:
        The type.

Copyright © 2014. All Rights Reserved.