Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.encog.ml.prg.extension
Interface ProgramExtensionTemplate

All Superinterfaces:
  Serializable

All Known Implementing Classes:
  BasicTemplate

    public interface ProgramExtensionTemplate

extends Serializable

Defines an opcode. Opcodes are used to extend Encog programs.

Field Summary
`static int` | `NO_PREC` Defines a very low precidence.

Method Summary
`ExpressionValue` | `evaluate(ProgramNode actual)` Evaluate the specified actual program node, using this opcode template.
`int` | `getChildNodeCount()`
`int` | `getDataSize()`
`String` | `getName()`
`NodeType` | `getNodeType()`
`List<ParamTemplate>` | `getParams()`
`int` | `getPrecedence()`
`ParamTemplate` | `getReturnValue()`
`boolean` | `isPossibleReturnType(EncogProgramContext context, ValueType rtn)` Determines if the specified return type is a possible return type.
`boolean` | `isVariable()`
`void` | `randomize(Random rnd, List<ValueType> desiredType, ProgramNode actual, double minValue, double maxValue)` Randomize this actual tree node.

Field Detail

### NO_PREC

    static final int NO_PREC

  Defines a very low precidence.

  See Also:
    Constant Field Values

Method Detail

### evaluate

    ExpressionValue evaluate(ProgramNode actual)

  Evaluate the specified actual program node, using this opcode template.

  Parameters:
    `actual` - The tree node in the actual program.
  Returns:
    The result of the evaluation.

### getChildNodeCount

    int getChildNodeCount()

  Returns:
    Get the number of child nodes that this opcode requires.

### getDataSize

    int getDataSize()

  Returns:
    The size of extra data that is stored by this node.

### getName

    String getName()

  Returns:
    Get the name of this opcode.

### getNodeType

    NodeType getNodeType()

  Returns:
    The node type.

### getParams

    List<ParamTemplate> getParams()

  Returns:
    The parameters (child nodes) required by this node.

### getPrecedence

    int getPrecedence()

  Returns:
    The operator precedence.

### getReturnValue

    ParamTemplate getReturnValue()

  Returns:
    The return value for this opcode.

### isPossibleReturnType

    boolean isPossibleReturnType(EncogProgramContext context,
                                 ValueType rtn)

  Determines if the specified return type is a possible return type.

  Parameters:
    `context` - The program context.
    `rtn` - The potential return type to check.
  Returns:
    True, if the specified type is a possible return type.

### isVariable

    boolean isVariable()

  Returns:
    Returns true if this node is variable.

### randomize

    void randomize(Random rnd,
                   List<ValueType> desiredType,
                   ProgramNode actual,
                   double minValue,
                   double maxValue)

  Randomize this actual tree node.

  Parameters:
    `rnd` - Random number generator.
    `desiredType` - The desired type of the randomization, if allowed.
    `actual` - The actual program node to randomize.
    `minValue` - The minimum value to use for randomization.
    `maxValue` - The maximum value to use for randomization.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2014. All Rights Reserved.