org.joone.engine
Class BufferedSynapse

java.lang.Object
  extended by org.joone.engine.Synapse
      extended by org.joone.engine.BufferedSynapse
All Implemented Interfaces:
java.io.Serializable, InputPatternListener, Learnable, LearnableSynapse, NeuralElement, OutputPatternListener, Inspectable

public class BufferedSynapse
extends Synapse

This class implements a synapse that permits to have asynchronous methods to write output patterns. The fwdPut method, infact, uses a FIFO structure to store the patterns and to separate the writing from the reading layers.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.joone.engine.Synapse
array, b_pattern, bitems, bouts, count, enabled, fwdLock, inps, items, learnable, m_batch, m_pattern, myLearner, outs, revLock
 
Constructor Summary
BufferedSynapse()
          BufferedOutputSynapse constructor.
 
Method Summary
protected  void backward(double[] pattern)
          Funzione di TRAIN dell'elemento.
protected  void forward(double[] pattern)
          Recall function
 Pattern fwdGet()
          Return the first element of the FIFO structure, if exists.
 void fwdPut(Pattern pattern)
          Writes the input pattern into the FIFO structure.
 Pattern revGet()
          Not used
 void revPut(Pattern pattern)
          Not used
protected  void setArrays(int rows, int cols)
          setArrays method comment.
protected  void setDimensions(int rows, int cols)
          setDimensions method comment.
 
Methods inherited from class org.joone.engine.Synapse
addNoise, canCountSteps, check, fwdPattern_consume, fwdPattern_produce, getCount, getFwdLock, getIgnoreBefore, getInputDimension, getLearner, getLearningRate, getMomentum, getMonitor, getName, getOutputDimension, getRevLock, getSynapseNameSafely, getWeights, init, initLearner, InspectableTitle, Inspections, isEnabled, isInputFull, isLoopBack, isOutputFull, randomize, readResolve, reset, revPattern_consume, revPattern_produce, setEnabled, setIgnoreBefore, setInputDimension, setInputFull, setLearningRate, setLoopBack, setMomentum, setMonitor, setName, setOutputDimension, setOutputFull, setWeights, warnLogger, warnLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BufferedSynapse

public BufferedSynapse()
BufferedOutputSynapse constructor.

Method Detail

backward

protected void backward(double[] pattern)
Description copied from class: Synapse
Funzione di TRAIN dell'elemento.

Specified by:
backward in class Synapse
Parameters:
pattern - double[] - pattern di input sul quale applicare la funzione di trasferimento

forward

protected void forward(double[] pattern)
Description copied from class: Synapse
Recall function

Specified by:
forward in class Synapse
Parameters:
pattern - double[] - input pattern. THIS PATTERN CANNOT BE CHANGED

fwdGet

public Pattern fwdGet()
Return the first element of the FIFO structure, if exists.

Specified by:
fwdGet in interface InputPatternListener
Overrides:
fwdGet in class Synapse
Returns:
Pattern

fwdPut

public void fwdPut(Pattern pattern)
Writes the input pattern into the FIFO structure. The layer that calls this methos will wait only the time needed to put the input data into the pipeline.

Specified by:
fwdPut in interface OutputPatternListener
Overrides:
fwdPut in class Synapse
Parameters:
pattern - The Pattern object to write in the FIFO structure

revGet

public Pattern revGet()
Not used

Specified by:
revGet in interface OutputPatternListener
Overrides:
revGet in class Synapse
Returns:
Pattern

revPut

public void revPut(Pattern pattern)
Not used

Specified by:
revPut in interface InputPatternListener
Overrides:
revPut in class Synapse
Parameters:
pattern -

setArrays

protected void setArrays(int rows,
                         int cols)
setArrays method comment.

Specified by:
setArrays in class Synapse

setDimensions

protected void setDimensions(int rows,
                             int cols)
setDimensions method comment.

Specified by:
setDimensions in class Synapse


Submit Feedback to pmarrone@users.sourceforge.net