public abstract class StreamInputSynapse extends Synapse implements InputSynapse, Inspectable
| Modifier and Type | Field and Description |
|---|---|
protected int[] |
cols |
protected int |
currentRow |
protected boolean |
EOF |
protected java.util.Vector |
InputVector |
protected java.util.List |
plugInListeners
List of plug-in listeners (often input connectors).
|
protected PatternTokenizer |
tokens |
| Constructor and Description |
|---|
StreamInputSynapse() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addPlugIn(ConverterPlugIn aNewPlugIn)
Adds a plug in to the stream input synapse for data preprocessing.
|
void |
addPlugInListener(PlugInListener aListener)
Adds a plug-in lsitener to this input stream.
|
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 |
fireDataChanged()
Fires an event to the plug-in listeners notifying that the underlying data
has 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)
This method is called by the InputConnector in order
to get the next input pattern available for that connector
|
java.lang.String |
getAdvancedColumnSelector() |
java.util.List |
getAllPlugInListeners()
Gets all the plug-in listeners.
|
int |
getCurrentRow()
Getter for property currentRow.
|
char |
getDecimalPoint()
Returns the decimal point accepted
(19/04/00 0.23.56)
|
int |
getFirstCol()
Deprecated.
|
int |
getFirstRow() |
java.util.Vector |
getInputPatterns()
Getter for property inputPatterns.
|
protected java.util.Vector |
getInputVector() |
int |
getLastCol()
Deprecated.
|
int |
getLastRow() |
int |
getMaxBufSize()
Getter for property maxBufSize.
|
ConverterPlugIn |
getPlugIn()
Gets the attached ConverterPlugin, if any
|
protected Pattern |
getStream() |
protected PatternTokenizer |
getTokens()
Getter for property tokens.
|
void |
gotoFirstLine() |
void |
gotoLine(int numLine)
Point to the indicated line into the input stream
|
protected void |
handleExceptionWithError(java.lang.Exception ex,
java.lang.String errMsg,
ILogger log) |
protected void |
handleExceptionWithWarn(java.lang.Exception ex,
java.lang.String errMsg,
ILogger logger) |
protected abstract void |
initInputStream() |
java.lang.String |
InspectableTitle()
Method to get the title to show
in the InspectionFrame tab.
|
java.util.Collection |
Inspections()
Method to get a collection of inspectable objects.
|
boolean |
isBuffered()
Checks if the input synapse is buffered or not
|
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
|
protected void |
readObjectBase(java.io.ObjectInputStream in) |
void |
removeAllPlugIns()
Removes (and disconnects) all (cascading) plug-ins.
|
void |
removePlugInListener(PlugInListener aListener)
Removes a plug-in listener from this input stream.
|
void |
reset()
reset the state of the input synapse
|
void |
resetInput()
Reset the input stream to read its content again
|
protected void |
restart() |
void |
revPut(Pattern array)
Method to put an error pattern backward to the previous layer
|
void |
setAdvancedColumnSelector(java.lang.String newAdvColSel) |
protected void |
setArrays(int rows,
int cols)
setArrays method.
|
void |
setBuffered(boolean aNewBuffered)
Sets the buffer-mode for this input synapse.
|
protected void |
setColList()
Sets the list of columns that must be returned as the pattern
Creation date: (18/10/2000 0.45.52)
|
void |
setDecimalPoint(char dp) |
protected void |
setDimensions(int rows,
int cols)
Dimensiona l'elemento
|
protected void |
setEOF(boolean newEOF) |
void |
setFirstCol(int firstCol)
Deprecated.
|
void |
setFirstRow(int newFirstRow)
Inserire qui la descrizione del metodo.
|
void |
setInputPatterns(java.util.Vector inputPatterns)
Setter for property inputPatterns.
|
void |
setLastCol(int lastCol)
Deprecated.
|
void |
setLastRow(int newLastRow)
Inserire qui la descrizione del metodo.
|
void |
setMaxBufSize(int maxBufSize)
Setter for property maxBufSize.
|
boolean |
setPlugin(ConverterPlugIn newPlugIn)
Deprecated.
addPlugIn(ConverterPlugIn). If you want to replace
the plug in by setting a new plug in please use
#removeAllPlugIns(ConverterPlugIn) and addPlugIn(ConverterPlugIn). |
void |
setPlugIn(ConverterPlugIn newPlugIn)
Added for XML serialization
**** DO NOT USE ****
Use addPlugin instead
|
void |
setStepCounter(boolean newStepCounter)
Inserire qui la descrizione del metodo.
|
protected void |
setTokens(PatternTokenizer tkn) |
protected void |
writeObjectBase(java.io.ObjectOutputStream out) |
protected Pattern |
zeroPattern() |
addNoise, canCountSteps, fwdPattern_consume, fwdPattern_produce, fwdPut, getCount, getFwdLock, getIgnoreBefore, getInputDimension, getLearner, getLearningRate, getMomentum, getMonitor, getName, getOutputDimension, getRevLock, getSynapseNameSafely, getWeights, init, initLearner, isEnabled, isInputFull, isLoopBack, isOutputFull, randomize, readResolve, revGet, revPattern_consume, revPattern_produce, setEnabled, setIgnoreBefore, setInputDimension, setInputFull, setLearningRate, setLoopBack, setMomentum, setMonitor, setName, setOutputDimension, setOutputFull, setWeights, warnLogger, warnLoggerprotected transient int[] cols
protected transient java.util.Vector InputVector
protected transient int currentRow
protected transient PatternTokenizer tokens
protected transient boolean EOF
protected java.util.List plugInListeners
protected void backward(double[] pattern)
Synapseprotected void forward(double[] pattern)
Synapsepublic Pattern fwdGet()
InputPatternListenerfwdGet in interface InputPatternListenerfwdGet in class Synapsepublic char getDecimalPoint()
getDecimalPoint in interface InputSynapsepublic int getFirstRow()
getFirstRow in interface InputSynapseprotected java.util.Vector getInputVector()
public int getLastRow()
getLastRow in interface InputSynapseprotected Pattern getStream() throws java.io.IOException
java.io.IOExceptionpublic void gotoFirstLine()
throws java.io.IOException
gotoFirstLine in interface InputSynapsejava.io.IOExceptionpublic void gotoLine(int numLine)
throws java.io.IOException
gotoLine in interface InputSynapsejava.io.IOExceptionpublic boolean isBuffered()
isBuffered in interface InputSynapsetrue in case the input stream is buffered, false otherwise.public boolean isEOF()
isEOF in interface InputSynapsepublic boolean isStepCounter()
isStepCounter in interface InputSynapsepublic int numColumns()
public void readAll()
readAll in interface InputSynapsepublic void revPut(Pattern array)
InputPatternListenerrevPut in interface InputPatternListenerrevPut in class Synapsearray - neural.engine.Patternprotected void setArrays(int rows,
int cols)
public void setBuffered(boolean aNewBuffered)
setBuffered in interface InputSynapseaNewBuffered - true if the input should be buffered.
false if the input should not be buffered, the input will be
retrieved from the input source every cycle again.
Whenever any converter plug in is added, the buffer-mode will be set
to true, regardless of the parameter's argument.
protected void setColList()
cols - java.util.Vectorpublic void setDecimalPoint(char dp)
setDecimalPoint in interface InputSynapseprotected void setDimensions(int rows,
int cols)
SynapsesetDimensions in class Synapseprotected void setEOF(boolean newEOF)
public void setFirstRow(int newFirstRow)
setFirstRow in interface InputSynapsenewFirstRow - intpublic void resetInput()
resetInput in interface InputSynapseprotected void restart()
public void setLastRow(int newLastRow)
setLastRow in interface InputSynapsenewLastRow - intpublic boolean addPlugIn(ConverterPlugIn aNewPlugIn)
aNewPlugIn - The new converter plug in to add (at the end of the list).true when the plug in is added, false when
the plug in is not added, e.g. in case the plug in is already added /
connected to another synapse.public void removeAllPlugIns()
public boolean setPlugin(ConverterPlugIn newPlugIn)
addPlugIn(ConverterPlugIn). If you want to replace
the plug in by setting a new plug in please use
#removeAllPlugIns(ConverterPlugIn) and addPlugIn(ConverterPlugIn).newPlugIn - the plug in to setpublic ConverterPlugIn getPlugIn()
public void setPlugIn(ConverterPlugIn newPlugIn)
public void setStepCounter(boolean newStepCounter)
setStepCounter in interface InputSynapsenewStepCounter - booleanprotected void writeObjectBase(java.io.ObjectOutputStream out)
throws java.io.IOException
java.io.IOExceptionprotected void readObjectBase(java.io.ObjectInputStream in)
throws java.io.IOException,
java.lang.ClassNotFoundException
java.io.IOExceptionjava.lang.ClassNotFoundExceptionpublic int getLastCol()
getLastCol in interface InputSynapsepublic void setLastCol(int lastCol)
throws java.lang.IllegalArgumentException
setLastCol in interface InputSynapselastCol - New value of property lastCol.java.lang.IllegalArgumentExceptionpublic int getFirstCol()
getFirstCol in interface InputSynapsepublic void setFirstCol(int firstCol)
throws java.lang.IllegalArgumentException
setFirstCol in interface InputSynapsefirstCol - New value of property firstCol.java.lang.IllegalArgumentExceptionpublic java.lang.String getAdvancedColumnSelector()
public void setAdvancedColumnSelector(java.lang.String newAdvColSel)
public void dataChanged(PlugInEvent data)
PlugInListenerdataChanged in interface PlugInListenerdata - the event that is send, i.e. the event indicating that the
data is changed.protected PatternTokenizer getTokens() throws JooneRuntimeException
JooneRuntimeExceptionprotected void setTokens(PatternTokenizer tkn)
protected Pattern zeroPattern()
protected abstract void initInputStream()
throws JooneRuntimeException
JooneRuntimeExceptionpublic java.util.TreeSet check()
check in interface NeuralElementcheck in class SynapseSynapsepublic java.util.Collection Inspections()
InspectableInspections in interface InspectableInspections in class Synapseorg.joone.Inspectionpublic java.lang.String InspectableTitle()
InspectableInspectableTitle in interface InspectableInspectableTitle in class Synapseorg.joone.InspectionFramepublic void reset()
reset in interface InputPatternListenerreset in class Synapsepublic int getMaxBufSize()
public void setMaxBufSize(int maxBufSize)
maxBufSize - New value of property maxBufSize.public java.util.Vector getInputPatterns()
public void setInputPatterns(java.util.Vector inputPatterns)
inputPatterns - New value of property inputPatterns.public Pattern fwdGet(InputConnector conn)
public int getCurrentRow()
public void addPlugInListener(PlugInListener aListener)
aListener - the listener to addpublic void removePlugInListener(PlugInListener aListener)
aListener - the listener to removepublic java.util.List getAllPlugInListeners()
protected void fireDataChanged()
protected void handleExceptionWithWarn(java.lang.Exception ex,
java.lang.String errMsg,
ILogger logger)
ex - errMsg - log - protected void handleExceptionWithError(java.lang.Exception ex,
java.lang.String errMsg,
ILogger log)
ex - errMsg - log - Submit Feedback to pmarrone@users.sourceforge.net