public class SpikeEvent extends java.lang.Object implements java.lang.Comparable<SpikeEvent>, java.lang.Cloneable
SpikingLink and SpikingNeuron objects
in a SpikingNeuralNet, during the simulation of a spiking neural network.
Each event represents an emitted or received spike. There are two static constants signaling
whether a specific event represents an emitted or a received spike.
A SpikeEvent encapsulates
If the event has the type PRE_SPIKE, it represents an emitted spike.
In this case the encapsulated function describes the form of the spike. Any
function can be used for this purpose, as long as it meets one of the following
two requirements:
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 maximum > 0 at max,
is monotonically increasing in [0, max], monotonically decreasing in [max, min] where f(min) < 0
and monotonically increasing in [min, infinity] converging to 0
If the event has the type POST_SPIKE, it represents a received spike, that means
a postsynaptic potential. In this case the encapsulated function describes the form of
the postsynaptic potential. Any function can be used for this purpose, as long as it meets
one of the following two requirements:
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
| Modifier and Type | Field and Description |
|---|---|
static int |
POST_SPIKE
Indicates a post-synaptic spike.
|
static int |
PRE_SPIKE
Indicates a pre-synaptic spike.
|
| Constructor and Description |
|---|
SpikeEvent()
Create a new SpikeEvent object, with no references and timestamp 0.
|
SpikeEvent(double time,
BrainPart origin,
BrainPart destination,
Function model,
int type)
Create a new SpikeEvent object, with the specified parameter values.
|
| Modifier and Type | Method and Description |
|---|---|
SpikeEvent |
clone()
Return a shallow copy of this SpikeEvent.
|
int |
compareTo(SpikeEvent other)
Compare this SpikeEvent with the specified SpikeEvent.
|
BrainPart |
getDestination() |
Function |
getFunction() |
BrainPart |
getOrigin() |
double |
getTime() |
int |
getType()
The type signals, if this event represents an emitted or received spike.
|
void |
setDestination(BrainPart destination) |
void |
setFunction(Function function) |
void |
setOrigin(BrainPart origin) |
void |
setTime(double time) |
void |
setType(int type)
The type signals, if this event represents an emitted or received spike.
|
java.lang.String |
toString() |
public static final int PRE_SPIKE
public static final int POST_SPIKE
public SpikeEvent()
public SpikeEvent(double time,
BrainPart origin,
BrainPart destination,
Function model,
int type)
time - the simulation time this event is raisedorigin - the network component that generated this eventdestination - the network component that handles this eventmodel - the form of the spike that this event representstype - signals if this event represents an emitted or received spikepublic BrainPart getOrigin()
public void setOrigin(BrainPart origin)
origin - the network component that generated this eventpublic BrainPart getDestination()
public void setDestination(BrainPart destination)
destination - the network component that handles this eventpublic double getTime()
public void setTime(double time)
time - the simulation time this event is raisedpublic Function getFunction()
public void setFunction(Function function)
function - the form of the spike that this event representspublic int getType()
PRE_SPIKE and POST_SPIKE.public void setType(int type)
PRE_SPIKE and POST_SPIKE.type - the type of this eventpublic int compareTo(SpikeEvent other)
compareTo in interface java.lang.Comparable<SpikeEvent>other - the SpikeEvent to be comparedpublic SpikeEvent clone()
clone in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object