The Encog Project

org.encog.neural.networks.layers
Class HopfieldLayer

java.lang.Object
  extended by org.encog.neural.networks.layers.BasicLayer
      extended by org.encog.neural.networks.layers.HopfieldLayer
All Implemented Interfaces:
Layer, EncogPersistedObject

public class HopfieldLayer
extends BasicLayer
implements EncogPersistedObject

HopfieldLayer: This class implements a Hopfield neural network. A Hopfield neural network is fully connected and consists of a single layer. Hopfield neural networks are usually used for pattern recognition.


Constructor Summary
HopfieldLayer(int size)
          Construct a hopfield layer of the specified size.
 
Method Summary
 NeuralData compute(NeuralData pattern)
          Present a pattern to the neural network and receive the result.
 BiPolarNeuralData getFire()
          Get the output array from the last time that the output of this layer was calculated.
 
Methods inherited from class org.encog.neural.networks.layers.BasicLayer
getFire, getMatrix, getMatrixSize, getNeuronCount, getNext, getPrevious, hasMatrix, isHidden, isInput, isOutput, reset, setFire, setFire, setMatrix, setNext, setPrevious
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HopfieldLayer

public HopfieldLayer(int size)
Construct a hopfield layer of the specified size.

Parameters:
size - The number of neurons in this layer.
Method Detail

compute

public NeuralData compute(NeuralData pattern)
Present a pattern to the neural network and receive the result.

Specified by:
compute in interface Layer
Overrides:
compute in class BasicLayer
Parameters:
pattern - The pattern to be presented to the neural network.
Returns:
The output from the neural network.

getFire

public BiPolarNeuralData getFire()
Description copied from class: BasicLayer
Get the output array from the last time that the output of this layer was calculated.

Specified by:
getFire in interface Layer
Overrides:
getFire in class BasicLayer
Returns:
Get the fire data.

The Encog Project