neuroidnet.ntr
Class Synapse

java.lang.Object
  |
  +--neuroidnet.ntr.Synapse
All Implemented Interfaces:
DumpsData, Expressive, Remote, Serializable, SynapseInt
Direct Known Subclasses:
Synapse

public class Synapse
extends Object
implements SynapseInt, DumpsData, Serializable, Expressive

Presynaptic connection to a Neuroid.

Since:
1.0
Version:
$Revision: 1.19 $
Author:
Cengiz Gunay
See Also:
Neuroid, Serialized Form

Nested Class Summary
(package private)  class Synapse.Weight
           
 
Field Summary
(package private)  double delay
          Axonal delay associated with this synapse (simplified).
(package private)  Neuroid destNeuroid
          Postsynaptic neuroid
(package private)  int id
          Identifier number of this synapse as index in the list of synapses at the postsynaptic neuroid, therefore in reference to that neuroid.
(package private)  boolean isInhibitory
           
static double maxWeight
          Constant maxWeight is the upper limit any synapse weight can have.
(package private)  SynapseProfile profile
           
(package private)  Vector spikeTrain
          List of times when spikes are received
(package private)  Neuroid srcNeuroid
          Presynaptic neuroid.
(package private)  double timeConstantM
          Synapse constant dynamic properties.
(package private)  double timeConstantS
          Synapse constant dynamic properties.
(package private)  boolean watch
          If set, it saves information about its (weight) changes.
 Synapse.Weight weight
          Incoming weight.
 
Constructor Summary
Synapse(Neuroid srcNeuroid, Neuroid destNeuroid, double timeConstantM, double timeConstantS, boolean isInhibitory, double delay)
          Creates a new Synapse instance.
Synapse(Neuroid srcNeuroid, Neuroid destNeuroid, Synapse templateSynapse)
          Creates a new Synapse instance with help of a templateSynapse.
 
Method Summary
 String dumpData()
          Deprecated. Use plots instead.
 double getDelay()
          Get the value of delay.
 Neuroid getDestNeuroid()
          Get the value of destNeuroid.
 int getId()
          Get the value of id.
(package private)  double getPotential()
          Total effect of potentiation from Synapse.
 SynapseProfile getProfile()
          Get the value of profile.
 String getProperties()
          Describe in higher detail.
 Vector getSpikeTrain()
          Get the value of spikeTrain.
 Neuroid getSrcNeuroid()
          Get the value of srcNeuroid.
 String getStatus()
          Include output of toString() plus potential and weight.
 double getTimeConstantM()
          Get the value of timeConstantM.
 double getTimeConstantS()
          Get the value of timeConstantS.
 double getWeight()
          Get the value from weight.
 Synapse.Weight getWeightObject()
          Returns a reference to the weight object.
private  void init()
          Initialization code called from various constructors.
(package private)  boolean isPotentiated()
          Returns true if Synapse received a spike a short time back.
 boolean isWatch()
          Get the value of watch.
(package private)  double kernel(double time)
          Synapse effect kernel function taken from "Pulsed neural networks" of Maass and Bishop 1999, Eq 1.49, p.31 for equivalence to the integrate and fire model and its period calculation.
 String nameString()
           
 void receiveSpike()
          Receive a spike at this time instant.
 void setDelay(double v)
          Set the value of delay.
 void setDestNeuroid(Neuroid v)
          Set the value of destNeuroid.
 void setId(int v)
          Set the value of id.
 void setProfile(SynapseProfile v)
          Set the value of profile.
 void setSrcNeuroid(Neuroid v)
          Set the value of srcNeuroid.
 void setTimeConstantM(double v)
          Set the value of timeConstantM.
 void setTimeConstantS(double v)
          Set the value of timeConstantS.
 void setWatch(boolean v)
          Set the value of watch.
 void setWeight(double v)
          Set the value of weight.
 String statusString()
           
 String toString()
          Identifies the synapse using id and destNeuroid.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

spikeTrain

final Vector spikeTrain
List of times when spikes are received


id

int id
Identifier number of this synapse as index in the list of synapses at the postsynaptic neuroid, therefore in reference to that neuroid.

See Also:
toString

isInhibitory

boolean isInhibitory

timeConstantM

double timeConstantM
Synapse constant dynamic properties. The membrane time constant of the postsynaptic neuron. (Why in Snapse? See constructor documentation.)

See Also:
Synapse(neuroidnet.ntr.Neuroid, neuroidnet.ntr.Neuroid, neuroidnet.ntr.Synapse)

timeConstantS

double timeConstantS
Synapse constant dynamic properties. The synaptic rise time constant.


delay

double delay
Axonal delay associated with this synapse (simplified). delay is required for the phasesegregator.Network

See Also:
phasesegregator.Network

weight

public Synapse.Weight weight
Incoming weight.


srcNeuroid

Neuroid srcNeuroid
Presynaptic neuroid. TODO: The remote interfaces for this connection is not done yet. Presynaptic link can be made to either the neuroid itself or its axon, through which the neuron can be reached.


destNeuroid

Neuroid destNeuroid
Postsynaptic neuroid


maxWeight

public static final double maxWeight
Constant maxWeight is the upper limit any synapse weight can have.

See Also:
setWeight(double), Constant Field Values

profile

SynapseProfile profile

watch

boolean watch
If set, it saves information about its (weight) changes.

Constructor Detail

Synapse

public Synapse(Neuroid srcNeuroid,
               Neuroid destNeuroid,
               double timeConstantM,
               double timeConstantS,
               boolean isInhibitory,
               double delay)
Creates a new Synapse instance. Attaches itself to destNeuroid. Default weight is 1. One can create a synapse template for using later by giving null for the destneuroid.

TODO: timeConstantM might need to be associated with the neuroid, but then we lose the flexibility of assigning synapses with different time constants. In "Brief history of time constants" by C. Koch et al. it is claimed that synaptic effects change according to location of synapse on dendridic arbor.

Parameters:
destNeuroid - a Neuroid value
timeConstantM - a double value
timeConstantS - a double value
See Also:
Neuroid.synapses

Synapse

public Synapse(Neuroid srcNeuroid,
               Neuroid destNeuroid,
               Synapse templateSynapse)
Creates a new Synapse instance with help of a templateSynapse. Attaches itself to destNeuroid

Parameters:
destNeuroid - a Neuroid value
templateSynapse - a Synapse value
See Also:
Neuroid.synapses
Method Detail

getSpikeTrain

public Vector getSpikeTrain()
Get the value of spikeTrain.

Returns:
value of spikeTrain.

getId

public int getId()
Get the value of id.

Returns:
value of id.

setId

public void setId(int v)
Set the value of id.

Parameters:
v - Value to assign to id.

getTimeConstantM

public double getTimeConstantM()
Get the value of timeConstantM.

Returns:
value of timeConstantM.

setTimeConstantM

public void setTimeConstantM(double v)
Set the value of timeConstantM.

Parameters:
v - Value to assign to timeConstantM.

getTimeConstantS

public double getTimeConstantS()
Get the value of timeConstantS.

Returns:
value of timeConstantS.

setTimeConstantS

public void setTimeConstantS(double v)
Set the value of timeConstantS.

Parameters:
v - Value to assign to timeConstantS.

getDelay

public double getDelay()
Get the value of delay.

Returns:
value of delay.

setDelay

public void setDelay(double v)
Set the value of delay.

Parameters:
v - Value to assign to delay.

getWeightObject

public Synapse.Weight getWeightObject()
Returns a reference to the weight object.

Returns:
a Weight value

getWeight

public double getWeight()
Get the value from weight.

Returns:
value of weight.
See Also:
weight

setWeight

public void setWeight(double v)
Set the value of weight.

Parameters:
v - Value to assign to weight.
See Also:
weight

getSrcNeuroid

public Neuroid getSrcNeuroid()
Get the value of srcNeuroid.

Returns:
value of srcNeuroid.

setSrcNeuroid

public void setSrcNeuroid(Neuroid v)
Set the value of srcNeuroid.

Parameters:
v - Value to assign to srcNeuroid.

getDestNeuroid

public Neuroid getDestNeuroid()
Get the value of destNeuroid.

Returns:
value of destNeuroid.

setDestNeuroid

public void setDestNeuroid(Neuroid v)
Set the value of destNeuroid.

Parameters:
v - Value to assign to destNeuroid.

getProfile

public SynapseProfile getProfile()
Get the value of profile.

Returns:
value of profile.

setProfile

public void setProfile(SynapseProfile v)
Set the value of profile.

Parameters:
v - Value to assign to profile.

isWatch

public boolean isWatch()
Get the value of watch.

Returns:
value of watch.

setWatch

public void setWatch(boolean v)
Set the value of watch.

Parameters:
v - Value to assign to watch.

init

private final void init()
Initialization code called from various constructors. Init weights and adds Synapse to destNeuroid.synapses unless it's a template synapse.

See Also:
ntr.Neuroid#synapses

receiveSpike

public void receiveSpike()
Receive a spike at this time instant. Called by the presynaptic Neuroid. Remove old spikes from spikeTrain unless under watch.

Specified by:
receiveSpike in interface SynapseInt
See Also:
Neuroid.fire(), watch

kernel

double kernel(double time)
Synapse effect kernel function taken from "Pulsed neural networks" of Maass and Bishop 1999, Eq 1.49, p.31 for equivalence to the integrate and fire model and its period calculation.

Parameters:
time - a double value.
Returns:
Kernel potential function value for given time since spike.

getPotential

double getPotential()
Total effect of potentiation from Synapse.

Returns:
Potential of this synapse to be added to the total membrane potential of the neuroid.

isPotentiated

boolean isPotentiated()
Returns true if Synapse received a spike a short time back.

Returns:
true if potential before multiplication with weight is above an arbitrary value (0.5)

toString

public String toString()
Identifies the synapse using id and destNeuroid.

Specified by:
toString in interface Expressive
Overrides:
toString in class Object
Returns:
a String value

nameString

public String nameString()

getStatus

public String getStatus()
Include output of toString() plus potential and weight.

TODO: get the potential from a variable instead of calling getPotential

Specified by:
getStatus in interface Expressive
Returns:
a String value
See Also:
Expressive.toString()

statusString

public String statusString()

getProperties

public String getProperties()
Describe in higher detail.

Specified by:
getProperties in interface Expressive
Returns:
a String value
See Also:
Expressive.getStatus()

dumpData

public String dumpData()
Deprecated. Use plots instead.

Dump synaptic activity of concepts contained to output (matlab file?).

Specified by:
dumpData in interface DumpsData
Returns:
a String value of matlab code