The Encog Project

org.encog.neural.networks
Class NeuralStructure

java.lang.Object
  extended by org.encog.neural.networks.NeuralStructure

public class NeuralStructure
extends java.lang.Object

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

Constructor Summary
NeuralStructure(BasicNetwork network)
          Construct a structure object for the specified network.
 
Method Summary
 void finalizeStructure()
          Build the synapse and layer structure.
 java.util.List<Layer> getLayers()
           
 BasicNetwork getNetwork()
           
 java.util.Collection<Layer> getPreviousLayers(Layer targetLayer)
          Get the previous layers from the specified layer.
 java.util.Collection<Synapse> getPreviousSynapses(Layer targetLayer)
          Get the previous synapses.
 java.util.List<Synapse> getSynapses()
           
 
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

finalizeStructure

public void finalizeStructure()
Build the synapse and layer structure. This method should be called after you are done adding layers to a network.


getLayers

public java.util.List<Layer> getLayers()
Returns:
The layers in this neural network.

getNetwork

public BasicNetwork getNetwork()
Returns:
The network this structure belongs to.

getPreviousLayers

public java.util.Collection<Layer> getPreviousLayers(Layer targetLayer)
Get the previous layers from the specified layer.

Parameters:
targetLayer - The target layer.
Returns:
The previous layers.

getPreviousSynapses

public java.util.Collection<Synapse> getPreviousSynapses(Layer targetLayer)
Get the previous synapses.

Parameters:
targetLayer - The layer to get the previous layers from.
Returns:
A collection of synapses.

getSynapses

public java.util.List<Synapse> getSynapses()
Returns:
All synapses in the neural network.

The Encog Project