public class SpikingLink extends Link
Base class for links in a SpikingNeuralNet. A SpikingLink connects
a pair of SpikingNeurons.The activation function of a SpikingLink is used
to model the effect of a single spike fired by the source neuron to the overall potential
of the sink neuron. The default activation function for a SpikingLink is
PostsynapticPotential.
When the source neuron fires a new spike at time t the SpikingLink
creates a new PostsynapticPotential and wraps it in an event object with
timestamp = t + delay. The contribution of the source neuron to the overall potential
of the sink neuron at time t is the sum of all PostsynapticPotentials
with timestamp <= tn multiplied by the weight of the link.
Although any Function f can be set as activation function, it is recommended that
f meets one of the following properties:
f has a root at 0, a single maximum > 0 at max,
is monotonically increasing in [0, max] and monotonically decreasing in
[max, infinity], converging to 0
f has a root at 0, a single minimum < 0 at min,
is monotonically decreasing in [0, min] and monotonically increasing in
[min, infinity], converging to 0
activationFn, name, NO_ID, weight| Constructor and Description |
|---|
SpikingLink()
Create a new
SpikingLink with defaults for the attributes. |
SpikingLink(Neuron source,
Neuron sink,
double weight)
Create a new
SpikingLink with the specified weight and delay = 0,
and add it to the link lists in the specified source and sink neurons. |
| Modifier and Type | Method and Description |
|---|---|
void |
calculate()
Generate a new
SpikeEvent with timestamp set to value + delay, with type SpikeEvent.POST_SPIKE, and origin and destination
set to this links source and sink neuron respectively. |
SpikingLink |
clone()
Returns a semi-deep copy of this object.
|
void |
fromXML(org.jdom2.Element element,
NeuralNet net)
Reads attributes from XML tree.
|
double |
getDelay()
Return the link delay.
|
void |
randomize()
Sets the weight to 1.0 and the link delay to a random double value in the interval [0, 5).
|
void |
randomize(double min,
double max)
Sets the weight to 1.0 and the link delay to a random double value
in the (checked) interval
[min, max). |
void |
replaceFrom(Link oldLink)
Replaces the given old link with this new link, i.e.
|
void |
setBuffer(SpikeEventBuffer buffer)
Set a reference to the global buffer that holds all spikes generated inside the
SpikingNeuralNet to which this link belongs. |
void |
setDelay(double delay)
Set the link delay.
|
java.lang.String |
toString()
Return a string
|
org.jdom2.Element |
toXML(org.jdom2.Element element)
Writes attributes to XML.
|
clearSink, clearSource, disconnect, getOtherNeuron, getSink, getSource, getValue, isDangling, isDirected, isInputOf, isOutputOf, propagate, replaceNeuron, setDirected, setSink, setSource, setValueaddGradient, addToWeight, fromXML, getAccu, getActivationFn, getGradient, getID, getLastGradient, getName, getUniqueID, getWeight, isTrainable, reset, setAccu, setActivationFn, setGradient, setID, setLastGradient, setName, setTrainable, setWeightpublic SpikingLink()
SpikingLink with defaults for the attributes.
The delay property is set to 0 and weight to 1.public SpikingLink clone()
Linkpublic void calculate()
SpikeEvent with timestamp set to value + delay, with type SpikeEvent.POST_SPIKE, and origin and destination
set to this links source and sink neuron respectively.public void randomize()
public void randomize(double min,
double max)
[min, max). If min or max is negative, the negative value is set to 0.
If max is less than min, max is set to min.public void replaceFrom(Link oldLink)
LinkreplaceFrom in class Linkpublic double getDelay()
public void setDelay(double delay)
public void setBuffer(SpikeEventBuffer buffer)
SpikingNeuralNet to which this link belongs.public void fromXML(org.jdom2.Element element,
NeuralNet net)
public org.jdom2.Element toXML(org.jdom2.Element element)