Documentation of 'org.encog.app.generate.generators.AbstractTemplateGenerator' Java class
AbstractTemplateGenerator
org.encog.app.generate.generators

Class AbstractTemplateGenerator

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method and Description
      void addLine(java.lang.String line)
      Add a line, with proper indention.
      void addNameValue(java.lang.String name, double[] data)
      Add a name value definition, as a double array.
      void addNameValue(java.lang.String name, int value)
      Add a name-value as an int.
      void addNameValue(java.lang.String name, int[] data)
      Add a name-value array where the value is an int array.
      void addNameValue(java.lang.String name, java.lang.String value)
      Add a name-value where a string is the value.
      int[] createActivations(FlatNetwork flat)
      Create an array of activations based on a flat network.
      double[] createParams(FlatNetwork flat)
      Create an array of doubles to hold the specified flat network.
      void generate(EncogAnalyst theAnalyst)
      Generate based on the provided Encog Analyst.
      EncogAnalyst getAnalyst() 
      java.lang.String getContents() 
      int getIndentLevel() 
      abstract java.lang.String getNullArray() 
      abstract java.lang.String getTemplatePath() 
      void indentIn()
      Indent to the right one.
      void indentOut()
      Indent to the left one.
      abstract void processToken(java.lang.String command)
      Process the specified token.
      void setIndentLevel(int indentLevel) 
      void toBrokenList(java.lang.StringBuilder result, double[] data)
      Create an array list broken into 10 columns.
      void toBrokenList(java.lang.StringBuilder result, int[] data)
      Create an array list broken into 10 columns.
      void writeContents(java.io.File targetFile)
      Write the generated code to a file.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AbstractTemplateGenerator

        public AbstractTemplateGenerator()
    • Method Detail

      • addLine

        public void addLine(java.lang.String line)
        Add a line, with proper indention.
        Parameters:
        line - The line to add.
      • addNameValue

        public void addNameValue(java.lang.String name,
                                 double[] data)
        Add a name value definition, as a double array.
        Parameters:
        name - The name.
        data - THe data.
      • addNameValue

        public void addNameValue(java.lang.String name,
                                 int value)
        Add a name-value as an int.
        Parameters:
        name - The name.
        value - THe value.
      • addNameValue

        public void addNameValue(java.lang.String name,
                                 int[] data)
        Add a name-value array where the value is an int array.
        Parameters:
        name - The name.
        data - THe value.
      • addNameValue

        public void addNameValue(java.lang.String name,
                                 java.lang.String value)
        Add a name-value where a string is the value.
        Parameters:
        name - The name.
        value - The value.
      • createActivations

        public int[] createActivations(FlatNetwork flat)
        Create an array of activations based on a flat network.
        Parameters:
        flat - The flat network.
        Returns:
        The array of flat activations.
      • createParams

        public double[] createParams(FlatNetwork flat)
        Create an array of doubles to hold the specified flat network.
        Parameters:
        flat - The flat network to use as a model.
        Returns:
        The new array.
      • generate

        public void generate(EncogAnalyst theAnalyst)
        Generate based on the provided Encog Analyst.
        Specified by:
        generate in interface TemplateGenerator
        Parameters:
        theAnalyst - The Encog analyst to base this on.
      • getAnalyst

        public EncogAnalyst getAnalyst()
        Returns:
        The Encog analyst that we are using.
      • getIndentLevel

        public int getIndentLevel()
        Returns:
        The current indent level.
      • getNullArray

        public abstract java.lang.String getNullArray()
        Returns:
        A platform specific array set to null.
      • getTemplatePath

        public abstract java.lang.String getTemplatePath()
        Returns:
        Get a resource path to the template that we are using.
      • indentIn

        public void indentIn()
        Indent to the right one.
      • indentOut

        public void indentOut()
        Indent to the left one.
      • processToken

        public abstract void processToken(java.lang.String command)
        Process the specified token.
        Parameters:
        command - The token to process.
      • setIndentLevel

        public void setIndentLevel(int indentLevel)
      • toBrokenList

        public void toBrokenList(java.lang.StringBuilder result,
                                 double[] data)
        Create an array list broken into 10 columns. This prevents a very large array from creating a very long single line.
        Parameters:
        result - The string builder to add to.
        data - The data to convert.
      • toBrokenList

        public void toBrokenList(java.lang.StringBuilder result,
                                 int[] data)
        Create an array list broken into 10 columns. This prevents a very large array from creating a very long single line.
        Parameters:
        result - The string builder to add to.
        data - The data to convert.
      • writeContents

        public void writeContents(java.io.File targetFile)
        Write the generated code to a file.
        Specified by:
        writeContents in interface LanguageSpecificGenerator
        Parameters:
        targetFile - the output file

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.