org.encog.neural.networks.logic
Class HopfieldLogic

java.lang.Object
  extended by org.encog.neural.networks.logic.FeedforwardLogic
      extended by org.encog.neural.networks.logic.SimpleRecurrentLogic
          extended by org.encog.neural.networks.logic.ThermalLogic
              extended by org.encog.neural.networks.logic.HopfieldLogic
All Implemented Interfaces:
Serializable, NeuralLogic

public class HopfieldLogic
extends ThermalLogic

Provides the neural logic for an Hopfield type network. See HopfieldPattern for more information on this type of network.

See Also:
Serialized Form

Constructor Summary
HopfieldLogic()
           
 
Method Summary
 void addPattern(NeuralData pattern)
          Train the neural network for the specified pattern.
 void run()
          Perform one Hopfield iteration.
 int runUntilStable(int max)
          Run the network until it becomes stable and does not change from more runs.
 
Methods inherited from class org.encog.neural.networks.logic.ThermalLogic
calculateEnergy, clear, getCurrentState, getNeuronCount, getThermalLayer, getThermalSynapse, init, setCurrentState
 
Methods inherited from class org.encog.neural.networks.logic.SimpleRecurrentLogic
preprocessLayer
 
Methods inherited from class org.encog.neural.networks.logic.FeedforwardLogic
compute, getNetwork
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HopfieldLogic

public HopfieldLogic()
Method Detail

addPattern

public void addPattern(NeuralData pattern)
Train the neural network for the specified pattern. The neural network can be trained for more than one pattern. To do this simply call the train method more than once.

Parameters:
pattern - The pattern to train for.

run

public void run()
Perform one Hopfield iteration.


runUntilStable

public int runUntilStable(int max)
Run the network until it becomes stable and does not change from more runs.

Parameters:
max - The maximum number of cycles to run before giving up.
Returns:
The number of cycles that were run.


Copyright © 2011. All Rights Reserved.