|
||||||||||
| 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
public abstract class StreamInputSynapse
| Field Summary | |
|---|---|
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
|
| 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 | |
|---|---|
StreamInputSynapse()
|
|
| Method Summary | |
|---|---|
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()
|
| Methods inherited from class org.joone.engine.Synapse |
|---|
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, warnLogger |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected 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
| Constructor Detail |
|---|
public StreamInputSynapse()
| Method Detail |
|---|
protected void backward(double[] pattern)
Synapse
backward in class Synapsepattern - double[] - pattern di input sul quale applicare la funzione di trasferimentoprotected void forward(double[] pattern)
Synapse
forward in class Synapsepattern - double[] - input pattern. THIS PATTERN CANNOT BE CHANGEDpublic Pattern fwdGet()
InputPatternListener
fwdGet 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 InputSynapse
protected Pattern getStream()
throws java.io.IOException
java.io.IOException
public void gotoFirstLine()
throws java.io.IOException
gotoFirstLine in interface InputSynapsejava.io.IOException
public 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)
InputPatternListener
revPut in interface InputPatternListenerrevPut in class Synapsearray - neural.engine.Pattern
protected void setArrays(int rows,
int cols)
setArrays in class Synapsepublic 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 InputSynapse
protected void setDimensions(int rows,
int cols)
Synapse
setDimensions 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 - boolean
protected void writeObjectBase(java.io.ObjectOutputStream out)
throws java.io.IOException
java.io.IOException
protected void readObjectBase(java.io.ObjectInputStream in)
throws java.io.IOException,
java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundExceptionpublic int getLastCol()
getLastCol in interface InputSynapse
public 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 InputSynapse
public 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)
PlugInListener
dataChanged 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()
Inspectable
Inspections in interface InspectableInspections in class Synapseorg.joone.Inspectionpublic java.lang.String InspectableTitle()
Inspectable
InspectableTitle 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 -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||