|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.joone.engine.Synapse
org.joone.io.StreamInputSynapse
org.joone.io.InputSwitchSynapse
public class InputSwitchSynapse
This class acts as a switch that can connect its output to one of its connected input synapses. Many input synapses can be attached to the switch calling the method addInputSynapse, but only one is attached to the output; which one is comnnected is determined by the call to the method setActiveInput, passing to it the name of the selected synapse.
Field Summary | |
---|---|
protected java.util.Vector |
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, outs, revLock |
Constructor Summary | |
---|---|
InputSwitchSynapse()
The constructor |
Method Summary | |
---|---|
boolean |
addInputSynapse(StreamInputSynapse newInput)
Adds an input synapse to the switch |
protected void |
backward(double[] pattern)
Funzione di TRAIN dell'elemento. |
java.util.TreeSet |
check()
Check that parameters are set correctly. |
void |
dataChanged(PlugInEvent data)
This method is called by plug-ins whenever data is changed. |
protected void |
forward(double[] pattern)
Recall function |
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. |
java.lang.String |
getActiveInput()
Returns the name of the actual connected input synapse |
protected StreamInputSynapse |
getActiveSynapse()
Getter for property activeSynapse. |
java.lang.String |
getAdvancedColumnSelector()
|
java.util.Vector |
getAllInputs()
|
java.lang.String |
getDefaultInput()
Returns the name of the default input synapse that is connected when the reset method is called |
protected StreamInputSynapse |
getDefaultSynapse()
Getter for property defaultSynapse. |
int |
getFirstRow()
|
protected StreamInputSynapse |
getInputSynapse(java.lang.String inputName)
|
java.util.Collection |
getInspections()
|
int |
getLastRow()
|
Monitor |
getMonitor()
Returns the monitor |
java.lang.String |
getName()
Returns the name of the input synapse |
int |
getOutputDimension()
Returns the dimension of the input synapse |
ConverterPlugIn |
getPlugIn()
Gets the attached ConverterPlugin, if any |
void |
gotoFirstLine()
|
void |
gotoLine(int numLine)
Point to the indicated line into the input stream |
void |
init()
Synapse's initialization. |
protected void |
initInputStream()
|
boolean |
isBuffered()
Returns if the input synapse is buffered (10/04/00 23.11.30) |
boolean |
isEOF()
Returns if reached the EOF (10/04/00 23.16.20) |
boolean |
isStepCounter()
Returns if this input layer is an active counter of the steps. |
int |
numColumns()
|
void |
readAll()
Reads all input values and fills the buffer |
void |
removeAllInputs()
|
boolean |
removeInputSynapse(java.lang.String inputName)
Removes an input synapse from the switch |
void |
reset()
reset the state of the input synapse |
void |
resetInput()
Reset the input stream to read its content again |
void |
resetSwitch()
Resets the switch, connecting the default synapse to the output |
void |
revPut(Pattern pattern)
Method to put an error pattern backward to the previous layer |
void |
setActiveInput(java.lang.String newActiveInput)
Sets the input synapse connected to the output |
protected void |
setActiveSynapse(StreamInputSynapse activeSynapse)
Setter for property activeSynapse. |
void |
setAllInputs(java.util.Vector inps)
|
void |
setBuffered(boolean newBuffered)
Sets the buffer-mode for this input synapse. |
void |
setDecimalPoint(char dp)
|
void |
setDefaultInput(java.lang.String newDefaultInput)
Sets the name of the default input synapse that is connected when the reset method is called |
protected void |
setDefaultSynapse(StreamInputSynapse defaultSynapse)
Setter for property defaultSynapse. |
void |
setMonitor(Monitor newMonitor)
Sets the Monitor object of the input synapse |
void |
setName(java.lang.String name)
Sets the name of the input synapse |
void |
setOutputDimension(int newOutputDimension)
Sets the dimension of the input synapse |
void |
setStepCounter(boolean newStepCounter)
Inserire qui la descrizione del metodo. |
Methods inherited from class org.joone.engine.Synapse |
---|
addNoise, canCountSteps, fwdPattern_consume, fwdPattern_produce, fwdPut, getCount, getFwdLock, getIgnoreBefore, getInputDimension, getLearner, getLearningRate, getMomentum, getRevLock, getSynapseNameSafely, getWeights, initLearner, isEnabled, isInputFull, isLoopBack, isOutputFull, randomize, readResolve, revGet, revPattern_consume, revPattern_produce, setEnabled, setIgnoreBefore, setInputDimension, setInputFull, setLearningRate, setLoopBack, setMomentum, setOutputFull, setWeights, warnLogger, warnLogger |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.Vector inputs
Constructor Detail |
---|
public InputSwitchSynapse()
Method Detail |
---|
public void init()
Synapse
init
in interface NeuralElement
init
in class Synapse
public void resetSwitch()
public void reset()
StreamInputSynapse
reset
in interface InputPatternListener
reset
in class StreamInputSynapse
public boolean removeInputSynapse(java.lang.String inputName)
inputName
- The name of the synapse to remove
protected StreamInputSynapse getInputSynapse(java.lang.String inputName)
public boolean addInputSynapse(StreamInputSynapse newInput)
newInput
- the new input synapsepublic java.lang.String getActiveInput()
public void setActiveInput(java.lang.String newActiveInput)
newActiveInput
- the name of the input synapse to connectpublic java.lang.String getDefaultInput()
public void setDefaultInput(java.lang.String newDefaultInput)
newDefaultInput
- the name of the default input synapseprotected StreamInputSynapse getActiveSynapse()
protected void setActiveSynapse(StreamInputSynapse activeSynapse)
activeSynapse
- New value of property activeSynapse.protected StreamInputSynapse getDefaultSynapse()
protected void setDefaultSynapse(StreamInputSynapse defaultSynapse)
defaultSynapse
- New value of property defaultSynapse.public java.lang.String getName()
getName
in interface NeuralElement
getName
in class Synapse
Synapse.setName(java.lang.String)
public void setName(java.lang.String name)
setName
in interface NeuralElement
setName
in class Synapse
name
- StringSynapse.getName()
public void setOutputDimension(int newOutputDimension)
setOutputDimension
in interface InputPatternListener
setOutputDimension
in class Synapse
newOutputDimension
- intpublic void revPut(Pattern pattern)
revPut
in interface InputPatternListener
revPut
in class StreamInputSynapse
pattern
- neural.engine.Patternpublic Pattern fwdGet()
fwdGet
in interface InputPatternListener
fwdGet
in class StreamInputSynapse
public Pattern fwdGet(InputConnector conn)
fwdGet
in class StreamInputSynapse
public int getOutputDimension()
getOutputDimension
in interface InputPatternListener
getOutputDimension
in interface LearnableSynapse
getOutputDimension
in class Synapse
public Monitor getMonitor()
getMonitor
in interface Learnable
getMonitor
in interface NeuralElement
getMonitor
in class Synapse
public void setMonitor(Monitor newMonitor)
setMonitor
in interface NeuralElement
setMonitor
in class Synapse
newMonitor
- org.joone.engine.Monitorprotected void backward(double[] pattern)
Synapse
backward
in class StreamInputSynapse
pattern
- double[] - pattern di input sul quale applicare la funzione di trasferimentoprotected void forward(double[] pattern)
Synapse
forward
in class StreamInputSynapse
pattern
- double[] - input pattern. THIS PATTERN CANNOT BE CHANGEDpublic java.util.Vector getAllInputs()
public void setAllInputs(java.util.Vector inps)
public void resetInput()
StreamInputSynapse
resetInput
in interface InputSynapse
resetInput
in class StreamInputSynapse
protected void initInputStream()
initInputStream
in class StreamInputSynapse
public void setStepCounter(boolean newStepCounter)
StreamInputSynapse
setStepCounter
in interface InputSynapse
setStepCounter
in class StreamInputSynapse
newStepCounter
- booleanpublic void gotoLine(int numLine) throws java.io.IOException
gotoLine
in interface InputSynapse
gotoLine
in class StreamInputSynapse
java.io.IOException
public void dataChanged(PlugInEvent data)
PlugInListener
dataChanged
in interface PlugInListener
dataChanged
in class StreamInputSynapse
data
- the event that is send, i.e. the event indicating that the
data is changed.public void setDecimalPoint(char dp)
setDecimalPoint
in interface InputSynapse
setDecimalPoint
in class StreamInputSynapse
public boolean isEOF()
isEOF
in interface InputSynapse
isEOF
in class StreamInputSynapse
public void readAll()
StreamInputSynapse
readAll
in interface InputSynapse
readAll
in class StreamInputSynapse
public void setBuffered(boolean newBuffered)
StreamInputSynapse
setBuffered
in interface InputSynapse
setBuffered
in class StreamInputSynapse
newBuffered
- booleanpublic boolean isBuffered()
isBuffered
in interface InputSynapse
isBuffered
in class StreamInputSynapse
public ConverterPlugIn getPlugIn()
StreamInputSynapse
getPlugIn
in class StreamInputSynapse
public boolean isStepCounter()
isStepCounter
in interface InputSynapse
isStepCounter
in class StreamInputSynapse
public void gotoFirstLine() throws java.io.IOException
gotoFirstLine
in interface InputSynapse
gotoFirstLine
in class StreamInputSynapse
java.io.IOException
public void removeAllInputs()
public java.util.TreeSet check()
check
in interface NeuralElement
check
in class StreamInputSynapse
Synapse
public int getFirstRow()
getFirstRow
in interface InputSynapse
getFirstRow
in class StreamInputSynapse
public int getLastRow()
getLastRow
in interface InputSynapse
getLastRow
in class StreamInputSynapse
public java.util.Collection getInspections()
public int numColumns()
numColumns
in class StreamInputSynapse
public java.lang.String getAdvancedColumnSelector()
getAdvancedColumnSelector
in class StreamInputSynapse
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |