Documentation of 'org.encog.ml.prg.extension.ProgramExtensionTemplate' Java class
ProgramExtensionTemplate
org.encog.ml.prg.extension

Interface ProgramExtensionTemplate

  • All Superinterfaces:
    java.io.Serializable
    All Known Implementing Classes:
    BasicTemplate, ConstantPool


    public interface ProgramExtensionTemplate
    extends java.io.Serializable
    Defines an opcode. Opcodes are used to extend Encog programs.
    • Field Detail

      • NO_PARAMS

        static final java.util.List<ParamTemplate> NO_PARAMS
        No parameters.
    • 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

        java.lang.String getName()
        Returns:
        Get the name of this opcode.
      • getNodeType

        NodeType getNodeType()
        Returns:
        The node type.
      • getParams

        java.util.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(java.util.Random rnd,
                       java.util.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.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.