org.encog.persist

## Class EncogWriteHelper

- java.lang.Object
- - org.encog.persist.EncogWriteHelper

-     public class EncogWriteHelper
      extends Object

  Used to write an Encog EG/EGA file. EG files are used to hold Encog objects. EGA files are used to hold Encog Analyst scripts.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static char` | `COMMA` A comma char.
    `static char` | `QUOTE` A quote char.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `EncogWriteHelper(OutputStream stream)` Construct the object.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addColumn(ActivationFunction act)`
    `void` | `addColumn(boolean b)` Add a boolean value as a column.
    `void` | `addColumn(double d)` Add a column as a double.
    `void` | `addColumn(int i)` Add a column as an integer.
    `void` | `addColumn(String str)` Add a column as a string.
    `void` | `addColumns(List<String> cols)` Add a list of string columns.
    `void` | `addLine(String l)` Add a line.
    `void` | `addProperties(Map<String,String> properties)` Add the specified properties.
    `void` | `addSection(String str)` Add a new section.
    `void` | `addSubSection(String str)` Add a new subsection.
    `void` | `flush()` Flush the file.
    `String` | `getCurrentSection()`
    `void` | `write(String str)` Write the specified string.
    `void` | `writeLine()` Write the line.
    `void` | `writeProperty(String name, ActivationFunction act)` Write a property as an activation function.
    `void` | `writeProperty(String name, boolean value)` Write the property as a boolean.
    `void` | `writeProperty(String name, CSVFormat csvFormat)` Write a property as a CSV format.
    `void` | `writeProperty(String name, double value)` Write the property as a double.
    `void` | `writeProperty(String name, double[] d)` Write the property as a double array.
    `void` | `writeProperty(String name, int value)` Write a property as an int value.
    `void` | `writeProperty(String name, int[] array)` Write a property as an int array.
    `void` | `writeProperty(String name, Matrix matrix)` Write a matrix as a property.
    `void` | `writeProperty(String name, String value)` Write the property a s string.

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

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

- - ### Field Detail

    - #### QUOTE

          public static final char QUOTE

      A quote char.
      See Also:
        Constant Field Values

    - #### COMMA

          public static final char COMMA

      A comma char.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### EncogWriteHelper

          public EncogWriteHelper(OutputStream stream)

      Construct the object.
      Parameters:
        `stream` - The stream to write to.

  - ### Method Detail

    - #### addColumn

          public final void addColumn(boolean b)

      Add a boolean value as a column.
      Parameters:
        `b` - The boolean value.

    - #### addColumn

          public final void addColumn(double d)

      Add a column as a double.
      Parameters:
        `d` - The double to add.

    - #### addColumn

          public final void addColumn(int i)

      Add a column as an integer.
      Parameters:
        `i` - The integer to add.

    - #### addColumn

          public final void addColumn(String str)

      Add a column as a string.
      Parameters:
        `str` - The string to add.

    - #### addColumns

          public final void addColumns(List<String> cols)

      Add a list of string columns.
      Parameters:
        `cols` - The columns to add.

    - #### addLine

          public final void addLine(String l)

      Add a line.
      Parameters:
        `l` - The line to add.

    - #### addProperties

          public final void addProperties(Map<String,String> properties)

      Add the specified properties.
      Parameters:
        `properties` - The properties.

    - #### addSection

          public final void addSection(String str)

      Add a new section.
      Parameters:
        `str` - The section to add.

    - #### addSubSection

          public final void addSubSection(String str)

      Add a new subsection.
      Parameters:
        `str` - The subsection.

    - #### flush

          public final void flush()

      Flush the file.

    - #### getCurrentSection

          public final String getCurrentSection()

      Returns:
        The current section.

    - #### write

          public final void write(String str)

      Write the specified string.
      Parameters:
        `str` - The string to write.

    - #### writeLine

          public final void writeLine()

      Write the line.

    - #### writeProperty

          public final void writeProperty(String name,
                           ActivationFunction act)

      Write a property as an activation function.
      Parameters:
        `name` - The name of the property.
        `act` - The activation function.

    - #### writeProperty

          public final void writeProperty(String name,
                           boolean value)

      Write the property as a boolean.
      Parameters:
        `name` - The name of the property.
        `value` - The boolean value.

    - #### writeProperty

          public final void writeProperty(String name,
                           CSVFormat csvFormat)

      Write a property as a CSV format.
      Parameters:
        `name` - The name of the property.
        `csvFormat` - The format.

    - #### writeProperty

          public final void writeProperty(String name,
                           double value)

      Write the property as a double.
      Parameters:
        `name` - The name of the property.
        `value` - The value.

    - #### writeProperty

          public final void writeProperty(String name,
                           double[] d)

      Write the property as a double array.
      Parameters:
        `name` - The name of the property.
        `d` - The double value.

    - #### writeProperty

          public final void writeProperty(String name,
                           int value)

      Write a property as an int value.
      Parameters:
        `name` - The name of the property.
        `value` - The int value.

    - #### writeProperty

          public final void writeProperty(String name,
                           int[] array)

      Write a property as an int array.
      Parameters:
        `name` - The name of the property.
        `array` - The array.

    - #### writeProperty

          public final void writeProperty(String name,
                           Matrix matrix)

      Write a matrix as a property.
      Parameters:
        `name` - The property name.
        `matrix` - The matrix.

    - #### writeProperty

          public final void writeProperty(String name,
                           String value)

      Write the property a s string.
      Parameters:
        `name` - The name of the property.
        `value` - The value.

    - #### addColumn

          public void addColumn(ActivationFunction act)

Copyright © 2014. All Rights Reserved.