org.joone.io
Class MultipleInputSynapse

java.lang.Object
  extended by org.joone.engine.Synapse
      extended by org.joone.io.StreamInputSynapse
          extended by org.joone.io.InputSwitchSynapse
              extended by org.joone.io.MultipleInputSynapse
All Implemented Interfaces:
java.io.Serializable, InputPatternListener, Learnable, LearnableSynapse, NeuralElement, OutputPatternListener, Inspectable, InputSynapse, PlugInListener

public class MultipleInputSynapse
extends InputSwitchSynapse

This class reads sequentially all the connected input synapses, in order to be able to use multiple sources as inputs. It reads all the rows of the first input synapse, then all the rows of the second one, and so on. The Stop Pattern is injected only after the last row of the last input synapse is read. When this class is used, the monitor.trainingPatterns must be set to the sum of the rows of all the attached input synapses.

Author:
P.Marrone
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.joone.io.InputSwitchSynapse
inputs
 
Fields inherited from class org.joone.io.StreamInputSynapse
cols, currentRow, EOF, InputVector, plugInListeners, tokens
 
Fields inherited from class org.joone.engine.Synapse
array, b_pattern, bitems, bouts, count, enabled, fwdLock, inps, items, learnable, m_batch, m_pattern, myLearner, notFirstTime, notFirstTimeB, outs, revLock
 
Constructor Summary
MultipleInputSynapse()
          Creates a new instance of MultipleInputSynapse
 
Method Summary
 Pattern fwdGet()
          Returns the pattern coming from the previous layer during the recall phase
 Pattern fwdGet(InputConnector conn)
          Returns the pattern coming from the previous layer during the recall phase.
protected  int getNumberOfPatterns(StreamInputSynapse anInputSynpase)
          Gets (finds out) how many patters an input synpase holds.
 void gotoLine(int aNumLine)
          Point to the indicated line into the input stream
 void reset()
          reset the state of the input synapse
 void setBuffered(boolean newBuffered)
          Sets the buffer-mode for this input synapse.
 void setFirstRow(int newFirstRow)
          Inserire qui la descrizione del metodo.
 void setLastRow(int newLastRow)
          Inserire qui la descrizione del metodo.
 
Methods inherited from class org.joone.io.InputSwitchSynapse
addInputSynapse, backward, check, dataChanged, forward, getActiveInput, getActiveSynapse, getAdvancedColumnSelector, getAllInputs, getDefaultInput, getDefaultSynapse, getFirstRow, getInputSynapse, getInspections, getLastRow, getMonitor, getName, getOutputDimension, getPlugIn, gotoFirstLine, init, initInputStream, initSwitch, isBuffered, isEOF, isStepCounter, numColumns, readAll, removeAllInputs, removeInputSynapse, resetInput, resetSwitch, revPut, setActiveInput, setActiveSynapse, setAllInputs, setDecimalPoint, setDefaultInput, setDefaultSynapse, setMonitor, setName, setOutputDimension, setStepCounter
 
Methods inherited from class org.joone.io.StreamInputSynapse
addPlugIn, addPlugInListener, fireDataChanged, getAllPlugInListeners, getCurrentRow, getDecimalPoint, getFirstCol, getInputPatterns, getInputVector, getLastCol, getMaxBufSize, getStream, getTokens, InspectableTitle, Inspections, readObjectBase, removeAllPlugIns, removePlugInListener, setAdvancedColumnSelector, setArrays, setColList, setDimensions, setEOF, setFirstCol, setInputPatterns, setLastCol, setMaxBufSize, setPlugin, setPlugIn, setTokens, writeObjectBase, zeroPattern
 
Methods inherited from class org.joone.engine.Synapse
addNoise, canCountSteps, fwdPut, getFwdLock, getIgnoreBefore, getInputDimension, getLearner, getLearningRate, getMomentum, getRevLock, getWeights, initLearner, isEnabled, isInputFull, isLoopBack, isOutputFull, randomize, readResolve, revGet, setEnabled, setIgnoreBefore, setInputDimension, setInputFull, setLearningRate, setLoopBack, setMomentum, setOutputFull, setWeights
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultipleInputSynapse

public MultipleInputSynapse()
Creates a new instance of MultipleInputSynapse

Method Detail

fwdGet

public Pattern fwdGet()
Description copied from class: InputSwitchSynapse
Returns the pattern coming from the previous layer during the recall phase

Specified by:
fwdGet in interface InputPatternListener
Overrides:
fwdGet in class InputSwitchSynapse
Returns:
neural.engine.Pattern

fwdGet

public Pattern fwdGet(InputConnector conn)
Description copied from class: InputSwitchSynapse
Returns the pattern coming from the previous layer during the recall phase. This method is called by the InputConnector class

Overrides:
fwdGet in class InputSwitchSynapse
Returns:
neural.engine.Pattern

getNumberOfPatterns

protected int getNumberOfPatterns(StreamInputSynapse anInputSynpase)
Gets (finds out) how many patters an input synpase holds.

Parameters:
anInputSynpase - the number of patterns for this input synpase will be returned.
Returns:
the number of patterns the anInputSynpase holds.

reset

public void reset()
Description copied from class: StreamInputSynapse
reset the state of the input synapse

Specified by:
reset in interface InputPatternListener
Overrides:
reset in class InputSwitchSynapse

setBuffered

public void setBuffered(boolean newBuffered)
Description copied from class: StreamInputSynapse
Sets the buffer-mode for this input synapse.

Specified by:
setBuffered in interface InputSynapse
Overrides:
setBuffered in class InputSwitchSynapse
Parameters:
newBuffered - boolean

gotoLine

public void gotoLine(int aNumLine)
              throws java.io.IOException
Description copied from class: InputSwitchSynapse
Point to the indicated line into the input stream

Specified by:
gotoLine in interface InputSynapse
Overrides:
gotoLine in class InputSwitchSynapse
Throws:
java.io.IOException

setFirstRow

public void setFirstRow(int newFirstRow)
Description copied from class: StreamInputSynapse
Inserire qui la descrizione del metodo. Data di creazione: (11/04/00 1.22.28)

Specified by:
setFirstRow in interface InputSynapse
Overrides:
setFirstRow in class StreamInputSynapse
Parameters:
newFirstRow - int

setLastRow

public void setLastRow(int newLastRow)
Description copied from class: StreamInputSynapse
Inserire qui la descrizione del metodo. Data di creazione: (11/04/00 1.22.34)

Specified by:
setLastRow in interface InputSynapse
Overrides:
setLastRow in class StreamInputSynapse
Parameters:
newLastRow - int


Submit Feedback to pmarrone@users.sourceforge.net