|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.simnet.interfaces.Synapse
public abstract class Synapse
Synapse objects represent "connections" between neurons, which learn (grow or weaken) based on various factors, including the activation level of connected neurons.
| Field Summary | |
|---|---|
protected String |
id
Synapse id. |
protected double |
increment
Amount to increment the neuron. |
protected double |
lowerBound
Lower limit of synapse. |
static int |
NUM_PARAMETERS
Number of parameters. |
protected Neuron |
source
Neuron activation will come from. |
protected SpikeResponder |
spikeResponder
Only used of source neuron is a spiking neuron. |
protected double |
strength
Strength of synapse. |
protected Neuron |
target
Neuron to which the synapse is attached. |
protected double |
upperBound
Upper limit of synapse. |
| Constructor Summary | |
|---|---|
Synapse()
Default synapse constructor. |
|
Synapse(Synapse s)
This constructor is used when creating a synapse of one type from another synapse of another type Only values common to different types of synapse are copied. |
|
| Method Summary | |
|---|---|
void |
checkBounds()
If weight value is above or below its bounds set it to those bounds. |
double |
clip(double value)
If value is above or below its bounds set it to those bounds. |
void |
decrementWeight()
Decrement this weight by increment. |
abstract Synapse |
duplicate()
|
Synapse |
duplicate(Synapse s)
Create duplicate weights. |
int |
getDelay()
|
double |
getGaugeValue()
|
String |
getId()
|
double |
getIncrement()
|
double |
getLowerBound()
|
Network |
getParent()
|
Neuron |
getSource()
|
SpikeResponder |
getSpikeResponder()
|
double |
getStrength()
|
static int |
getSynapseTypeIndex(String type)
Helper function for combo boxes. |
Neuron |
getTarget()
|
String |
getType()
|
static String[] |
getTypeList()
|
double |
getUpperBound()
|
double |
getValue()
For spiking source neurons, returns the spike-responder's value times the synapse strength For non-spiking neurons, returns the pre-synaptic activation times the synapse strength. |
void |
incrementWeight()
Increment this weight by increment. |
void |
init()
Initializes a new synapse. |
void |
initSpikeResponder()
Set a default spike responder if the source neuron is a spiking neuron, else set the spikeResponder to null. |
void |
randomize()
Randomize this weight to a value between its upper and lower bounds. |
void |
reinforce()
Increase the absolute value of this weight by increment amount. |
void |
setDelay(int dly)
Delay manager. |
void |
setId(String id)
|
void |
setIncrement(double d)
Sets the amount to increment neuron. |
void |
setLowerBound(double d)
Sets the lower synapse bound. |
void |
setParent(Network parent)
|
void |
setSource(Neuron n)
New source neuron to attach the synapse. |
void |
setSpikeResponder(SpikeResponder sr)
|
void |
setStrength(double wt)
Sets the strength of the synapse. |
void |
setTarget(Neuron n)
New target neuron to attach the synapse. |
void |
setUpperBound(double d)
Sets the upper synapse bound. |
String |
toString()
|
abstract void |
update()
Update synapse. |
void |
weaken()
Decrease the absolute value of this weight by increment amount. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected Neuron source
protected Neuron target
protected SpikeResponder spikeResponder
protected String id
public static final int NUM_PARAMETERS
protected double strength
protected double increment
protected double upperBound
protected double lowerBound
| Constructor Detail |
|---|
public Synapse()
public Synapse(Synapse s)
s - Synapse to be created from another| Method Detail |
|---|
public void init()
public void initSpikeResponder()
public Synapse duplicate(Synapse s)
s - weight to duplicate
public abstract void update()
public abstract Synapse duplicate()
public double getValue()
public String getType()
public double getStrength()
public double getGaugeValue()
getGaugeValue in interface GaugeSourceGaugeSourcepublic Neuron getSource()
public void setSource(Neuron n)
n - Neuron to attach synapsepublic Neuron getTarget()
public void setTarget(Neuron n)
n - Neuron to attach synapsepublic void setStrength(double wt)
wt - Strength valuepublic double getUpperBound()
public void setUpperBound(double d)
d - boundpublic double getLowerBound()
public void setLowerBound(double d)
d - boundpublic double getIncrement()
public void setIncrement(double d)
d - Increment amountpublic void incrementWeight()
public void decrementWeight()
public void reinforce()
public void weaken()
public void randomize()
public void checkBounds()
public double clip(double value)
value - Value to be checked
public String getId()
getId in interface GaugeSourcepublic void setId(String id)
id - The id to set.public static int getSynapseTypeIndex(String type)
type - Synapse type
public static String[] getTypeList()
public SpikeResponder getSpikeResponder()
public void setSpikeResponder(SpikeResponder sr)
sr - The spikeResponder to set.public void setDelay(int dly)
dly - Amound of delaypublic int getDelay()
public String toString()
toString in class ObjectObjectpublic Network getParent()
public void setParent(Network parent)
parent - The parent to set.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||