Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.joone.engine
Class OutputSwitchSynapse

    java.lang.Object
      org.joone.engine.OutputSwitchSynapse

All Implemented Interfaces:
  java.io.Serializable, NeuralElement, OutputPatternListener

    public class OutputSwitchSynapse

extends java.lang.Object
implements OutputPatternListener, java.io.Serializable

This class acts as a switch that can connect its input to one of its connected output synapses. Many output synapses can be attached to the switch calling the method addOutputSynapse, but only one is attached to the input; which one is connected is determined by the call to the method setActiveOutput, passing to it the name of the selected synapse.

See Also:
  Serialized Form

Field Summary
`protected java.util.Vector` | `outputs`

Constructor Summary
`OutputSwitchSynapse()` The constructor

Method Summary
`boolean` | `addOutputSynapse(OutputPatternListener newOutput)` Adds an output synapse to the switch
`protected void` | `backward(double[] pattern)`
`java.util.TreeSet` | `check()` Base for check messages.
`protected void` | `forward(double[] pattern)`
`void` | `fwdPut(Pattern pattern)` Method to put a pattern forward to the next layer
`java.lang.String` | `getActiveOutput()` Returns the name of the actual connected output synapse
`protected OutputPatternListener` | `getActiveSynapse()` Getter for property activeSynapse.
`java.util.Vector` | `getAllOutputs()`
`java.lang.String` | `getDefaultOutput()` Returns the name of the default output synapse that is connected when the reset method is called
`protected OutputPatternListener` | `getDefaultSynapse()` Getter for property defaultSynapse.
`int` | `getInputDimension()` Returns the dimension of the output synapse
`Monitor` | `getMonitor()` Returns the monitor
`java.lang.String` | `getName()` Returns the name of the output synapse
`protected OutputPatternListener` | `getOutputSynapse(java.lang.String outputName)`
`void` | `init()`
`boolean` | `isEnabled()` Getter for property enabled.
`boolean` | `isOutputFull()` Getter for property outputFull.
`boolean` | `removeOutputSynapse(java.lang.String outputName)` Removes an output synapse from the switch
`void` | `reset()` Resets the switch, connecting the default synapse to the output
`void` | `resetOutput()`
`Pattern` | `revGet()` Returns the error pattern coming from the next layer during the training phase
`void` | `setActiveOutput(java.lang.String newActiveOutput)` Sets the output synapse connected to the input
`protected void` | `setActiveSynapse(OutputPatternListener activeSynapse)` Setter for property activeSynapse.
`void` | `setDefaultOutput(java.lang.String newDefaultOutput)` Sets the name of the default output synapse that is connected when the reset method is called
`protected void` | `setDefaultSynapse(OutputPatternListener defaultSynapse)` Setter for property defaultSynapse.
`void` | `setEnabled(boolean enabled)` Setter for property enabled.
`void` | `setInputDimension(int newInputDimension)` Sets the dimension of the output synapse
`void` | `setMonitor(Monitor newMonitor)` Sets the Monitor object of the input synapse
`void` | `setName(java.lang.String name)` Sets the name of the output synapse
`void` | `setOutputFull(boolean outputFull)` Setter for property outputFull.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### outputs

    protected java.util.Vector outputs

Constructor Detail

### OutputSwitchSynapse

    public OutputSwitchSynapse()

  The constructor

Method Detail

### reset

    public void reset()

  Resets the switch, connecting the default synapse to the output

### removeOutputSynapse

    public boolean removeOutputSynapse(java.lang.String outputName)

  Removes an output synapse from the switch

  Parameters:
    `inputName` - The name of the synapse to remove

### getOutputSynapse

    protected OutputPatternListener getOutputSynapse(java.lang.String outputName)

### addOutputSynapse

    public boolean addOutputSynapse(OutputPatternListener newOutput)

  Adds an output synapse to the switch

  Parameters:
    `newOutput` - the new output synapse

### getActiveOutput

    public java.lang.String getActiveOutput()

  Returns the name of the actual connected output synapse

  Returns:
    The name of the connected output synapse

### setActiveOutput

    public void setActiveOutput(java.lang.String newActiveOutput)

  Sets the output synapse connected to the input

  Parameters:
    `newActiveOutput` - the name of the output synapse to connect

### getDefaultOutput

    public java.lang.String getDefaultOutput()

  Returns the name of the default output synapse that is connected when the reset method is called

  Returns:
    the name of the default synapse

### setDefaultOutput

    public void setDefaultOutput(java.lang.String newDefaultOutput)

  Sets the name of the default output synapse that is connected when the reset method is called

  Parameters:
    `newDefaultOutput` - the name of the default output synapse

### getActiveSynapse

    protected OutputPatternListener getActiveSynapse()

  Getter for property activeSynapse. @return Value of property activeSynapse.

### setActiveSynapse

    protected void setActiveSynapse(OutputPatternListener activeSynapse)

  Setter for property activeSynapse. @param activeSynapse New value of property activeSynapse.

### getDefaultSynapse

    protected OutputPatternListener getDefaultSynapse()

  Getter for property defaultSynapse. @return Value of property defaultSynapse.

### setDefaultSynapse

    protected void setDefaultSynapse(OutputPatternListener defaultSynapse)

  Setter for property defaultSynapse. @param defaultSynapse New value of property defaultSynapse.

### getName

    public java.lang.String getName()

  Returns the name of the output synapse

  Specified by:
    `getName` in interface `NeuralElement`
  Returns:
    String

### setName

    public void setName(java.lang.String name)

  Sets the name of the output synapse

  Specified by:
    `setName` in interface `NeuralElement`
  Parameters:
    `name` - String

### setInputDimension

    public void setInputDimension(int newInputDimension)

  Sets the dimension of the output synapse

  Specified by:
    `setInputDimension` in interface `OutputPatternListener`
  Parameters:
    `newOutputDimension` - int

### getInputDimension

    public int getInputDimension()

  Returns the dimension of the output synapse

  Specified by:
    `getInputDimension` in interface `OutputPatternListener`
  Returns:
    int

### getMonitor

    public Monitor getMonitor()

  Returns the monitor

  Specified by:
    `getMonitor` in interface `NeuralElement`
  Returns:
    org.joone.engine.Monitor

### setMonitor

    public void setMonitor(Monitor newMonitor)

  Sets the Monitor object of the input synapse

  Specified by:
    `setMonitor` in interface `NeuralElement`
  Parameters:
    `newMonitor` - org.joone.engine.Monitor

### backward

    protected void backward(double[] pattern)

### forward

    protected void forward(double[] pattern)

### getAllOutputs

    public java.util.Vector getAllOutputs()

### resetOutput

    public void resetOutput()

### fwdPut

    public void fwdPut(Pattern pattern)

  Method to put a pattern forward to the next layer

  Specified by:
    `fwdPut` in interface `OutputPatternListener`
  Parameters:
    `pattern` - neural.engine.Pattern

### revGet

    public Pattern revGet()

  Returns the error pattern coming from the next layer during the training phase

  Specified by:
    `revGet` in interface `OutputPatternListener`
  Returns:
    neural.engine.Pattern

### check

    public java.util.TreeSet check()

  Base for check messages. Subclasses should call this method from thier own check method.

  Specified by:
    `check` in interface `NeuralElement`
  Returns:
    validation errors.
  See Also:
    `OutputPaternListener`

### isOutputFull

    public boolean isOutputFull()

  Getter for property outputFull.

  Specified by:
    `isOutputFull` in interface `OutputPatternListener`
  Returns:
    Value of property outputFull.

### setOutputFull

    public void setOutputFull(boolean outputFull)

  Setter for property outputFull.

  Specified by:
    `setOutputFull` in interface `OutputPatternListener`
  Parameters:
    `outputFull` - New value of property outputFull.

### isEnabled

    public boolean isEnabled()

  Getter for property enabled.

  Specified by:
    `isEnabled` in interface `NeuralElement`
  Returns:
    Value of property enabled.

### setEnabled

    public void setEnabled(boolean enabled)

  Setter for property enabled.

  Specified by:
    `setEnabled` in interface `NeuralElement`
  Parameters:
    `enabled` - New value of property enabled.

### init

    public void init()

  Specified by:
    `init` in interface `NeuralElement`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Submit Feedback to pmarrone@users.sourceforge.net