The Encog Project

org.encog.neural.networks.synapse
Class BasicSynapse

java.lang.Object
  extended by org.encog.neural.networks.synapse.BasicSynapse
All Implemented Interfaces:
java.io.Serializable, Synapse, EncogPersistedObject
Direct Known Subclasses:
DirectSynapse, OneToOneSynapse, WeightedSynapse, WeightlessSynapse

public abstract class BasicSynapse
extends java.lang.Object
implements Synapse

An abstract class that implements basic functionality that may be needed by the other synapse classes. Specifically this class handles processing the from and to layer, as well as providing a name and description for the EncogPersistedObject.

Author:
jheaton
See Also:
Serialized Form

Constructor Summary
BasicSynapse()
           
 
Method Summary
abstract  java.lang.Object clone()
           
 java.lang.String getDescription()
          The EncogPersistedObject requires a name and description, however, these are not used on synapses.
 Layer getFromLayer()
           
 int getFromNeuronCount()
           
 java.lang.String getName()
          The EncogPersistedObject requires a name and description, however, these are not used on synapses.
 Layer getToLayer()
           
 int getToNeuronCount()
           
 boolean isSelfConnected()
           
 void setDescription(java.lang.String d)
          The EncogPersistedObject requires a name and description, however, these are not used on synapses.
 void setFromLayer(Layer fromLayer)
          Set the from layer for this synapse.
 void setName(java.lang.String n)
          The EncogPersistedObject requires a name and description, however, these are not used on synapses.
 void setToLayer(Layer toLayer)
          Set the target layer from this synapse.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.encog.neural.networks.synapse.Synapse
compute, getMatrix, getMatrixSize, getType, isTeachable, setMatrix
 
Methods inherited from interface org.encog.persist.EncogPersistedObject
createPersistor
 

Constructor Detail

BasicSynapse

public BasicSynapse()
Method Detail

clone

public abstract java.lang.Object clone()
Specified by:
clone in interface Synapse
Overrides:
clone in class java.lang.Object
Returns:
A clone of this object.

getDescription

public java.lang.String getDescription()
The EncogPersistedObject requires a name and description, however, these are not used on synapses.

Specified by:
getDescription in interface EncogPersistedObject
Returns:
Not used.

getFromLayer

public Layer getFromLayer()
Specified by:
getFromLayer in interface Synapse
Returns:
The from layer.

getFromNeuronCount

public int getFromNeuronCount()
Specified by:
getFromNeuronCount in interface Synapse
Returns:
The neuron count from the "from layer".

getName

public java.lang.String getName()
The EncogPersistedObject requires a name and description, however, these are not used on synapses.

Specified by:
getName in interface EncogPersistedObject
Returns:
Not used.

getToLayer

public Layer getToLayer()
Specified by:
getToLayer in interface Synapse
Returns:
The "to layer".

getToNeuronCount

public int getToNeuronCount()
Specified by:
getToNeuronCount in interface Synapse
Returns:
The neuron count from the "to layer".

isSelfConnected

public boolean isSelfConnected()
Specified by:
isSelfConnected in interface Synapse
Returns:
True if this is a self-connected synapse. That is, the from and to layers are the same.

setDescription

public void setDescription(java.lang.String d)
The EncogPersistedObject requires a name and description, however, these are not used on synapses.

Specified by:
setDescription in interface EncogPersistedObject
Parameters:
d - Not used.

setFromLayer

public void setFromLayer(Layer fromLayer)
Set the from layer for this synapse.

Specified by:
setFromLayer in interface Synapse
Parameters:
fromLayer - The from layer for this synapse.

setName

public void setName(java.lang.String n)
The EncogPersistedObject requires a name and description, however, these are not used on synapses.

Specified by:
setName in interface EncogPersistedObject
Parameters:
n - Not used.

setToLayer

public void setToLayer(Layer toLayer)
Set the target layer from this synapse.

Specified by:
setToLayer in interface Synapse
Parameters:
toLayer - The target layer from this synapse.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
The synapse as a string.

The Encog Project