org.encog.neural.networks.structure

## Class NeuralStructure

- java.lang.Object
- - org.encog.neural.networks.structure.NeuralStructure

- All Implemented Interfaces:
    Serializable

      public class NeuralStructure
      extends Object
      implements Serializable

  Holds "cached" information about the structure of the neural network. This is a very good performance boost since the neural network does not need to traverse itself each time a complete collection of layers or synapses is needed.
  Author:
    jheaton
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `NeuralStructure(BasicNetwork network)` Construct a structure object for the specified network.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `calculateSize()` Calculate the size that an array should be to hold all of the weights and bias values.
    `void` | `enforceLimit()` Enforce that all connections are above the connection limit.
    `void` | `finalizeLimit()` Parse/finalize the limit value for connections.
    `void` | `finalizeStructure()` Build the synapse and layer structure.
    `double` | `getConnectionLimit()`
    `FlatNetwork` | `getFlat()`
    `List<Layer>` | `getLayers()`
    `BasicNetwork` | `getNetwork()`
    `boolean` | `isConnectionLimited()`
    `void` | `requireFlat()` Throw an error if there is no flat network.
    `void` | `setFlat(FlatNetwork flat)` Set the flat network.
    `void` | `updateProperties()` Update any properties from the property map.

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

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

- - ### Constructor Detail

    - #### NeuralStructure

          public NeuralStructure(BasicNetwork network)

      Construct a structure object for the specified network.
      Parameters:
        `network` - The network to construct a structure for.

  - ### Method Detail

    - #### calculateSize

          public final int calculateSize()

      Calculate the size that an array should be to hold all of the weights and bias values.
      Returns:
        The size of the calculated array.

    - #### enforceLimit

          public final void enforceLimit()

      Enforce that all connections are above the connection limit. Any connections below this limit will be severed.

    - #### finalizeLimit

          public void finalizeLimit()

      Parse/finalize the limit value for connections.

    - #### finalizeStructure

          public final void finalizeStructure()

      Build the synapse and layer structure. This method should be called after you are done adding layers to a network, or change the network's logic property.

    - #### getConnectionLimit

          public final double getConnectionLimit()

      Returns:
        The connection limit.

    - #### getFlat

          public final FlatNetwork getFlat()

      Returns:
        The flat network.

    - #### getLayers

          public final List<Layer> getLayers()

      Returns:
        The layers in this neural network.

    - #### getNetwork

          public final BasicNetwork getNetwork()

      Returns:
        The network this structure belongs to.

    - #### isConnectionLimited

          public final boolean isConnectionLimited()

      Returns:
        True if this is not a fully connected feedforward network.

    - #### requireFlat

          public final void requireFlat()

      Throw an error if there is no flat network.

    - #### setFlat

          public final void setFlat(FlatNetwork flat)

      Set the flat network.
      Parameters:
        `flat` - The flat network.

    - #### updateProperties

          public final void updateProperties()

      Update any properties from the property map.

Copyright © 2014. All Rights Reserved.