neuroidnet.ntr
Class Neuroid

java.lang.Object
  |
  +--neuroidnet.ntr.Neuroid
All Implemented Interfaces:
Expressive, Input, Serializable, Simulation
Direct Known Subclasses:
SRMNeuroid

public abstract class Neuroid
extends Object
implements Simulation, Input, Expressive

Abstract neuroid entity. Instances are contained in Areas.

Since:
1.0
Version:
$Revision: 1.25 $ for this file
Author:
Cengiz Gunay
See Also:
Area, Serialized Form

Nested Class Summary
protected  class Neuroid.Mode
          Modes that a neuron can have.
(package private)  class Neuroid.SynapseActivityTask
          Iterator task class which scans synapses of the neuroid.
 
Field Summary
protected  Area area
          Parent Area.
protected  Concept concept
          Associated concept if neuroid has memorized anything.
(package private)  boolean debug
          If set, outputs debugging info about this neuroid.
(package private)  int id
          Sequence of Neuroid in the array held in Area.
protected  Neuroid.Mode mode
          Represents the state and dynamic parameters of the neuroid.
(package private)  double potential
          Membrane potential.
(package private)  NeuroidProfile profile
           
(package private)  Vector spikeTrain
          List of times that the neuroid fired.
protected  Dendrite synapses
          List of incoming synapses.
(package private)  double timeLastFired
          Last firing time of this Neuroid.
protected  boolean watch
          If set, the neuroid saves informatoin about its state changes.
 
Constructor Summary
Neuroid(Area area)
          and connects to area.
 
Method Summary
 int addSynapse(Synapse synapse)
          Add synapse to synapses and return index to become the id of the Synapse.
protected abstract  void calculatePotential()
          Calculate the potential here.
 String dumpData()
          Deprecated. Use plots and the profile gathering system.
 void fire()
          Fires the neuroid.
 Area getArea()
          Get the value of area.
 Concept getConcept()
          Get the value of concept.
 int getId()
          Get the value of id.
 Neuroid.Mode getMode()
          Get the value of mode.
 NeuroidProfile getProfile()
          Get the value of profile.
 String getProperties()
          Describe in higher detail.
 Vector getSpikeTrain()
          Get the value of spikeTrain.
 String getStatus()
          Output of toString() plus potential, mode status, last fire time, and concept name.
 Dendrite getSynapses()
          Get the value of synapses.
 double getTimeLastFired()
          Get the value of timeLastFired.
 void init()
          N/A
 boolean isDebug()
          Get the value of debug.
 boolean isWatch()
          Get the value of watch.
(package private)  void makeConcept()
          Create new concept.
 void setArea(Area v)
          Set the value of area.
 void setDebug(boolean v)
          Set the value of debug.
 void setMode(Neuroid.Mode v)
          Set the value of mode and connects any profilers if watched.
 void setProfile(NeuroidProfile v)
          Set the value of profile.
 void setSpikeTrain(Vector v)
          Set the value of spikeTrain.
 void setWatch(boolean v)
          Set the value of watch.
 void step()
          Update state of the Neuroid.
 void stop()
          N/A
 String toString()
          Identify the neuroid with its id and area.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

potential

double potential
Membrane potential.


synapses

protected Dendrite synapses
List of incoming synapses.


timeLastFired

double timeLastFired
Last firing time of this Neuroid.


area

protected Area area
Parent Area.


concept

protected Concept concept
Associated concept if neuroid has memorized anything.

See Also:
Concept

id

final int id
Sequence of Neuroid in the array held in Area. Good for representation. Used to override Object.hashCode() and don't pass around this id, but hascode is dynamic and changes at every runtime, leaving us with a volatile identifier. Oh, well. Set in Area.addNeuroid()

See Also:
Area.neuroids, Area.addNeuroid(neuroidnet.ntr.Neuroid)

mode

protected Neuroid.Mode mode
Represents the state and dynamic parameters of the neuroid.


debug

boolean debug
If set, outputs debugging info about this neuroid.


watch

protected boolean watch
If set, the neuroid saves informatoin about its state changes.


spikeTrain

Vector spikeTrain
List of times that the neuroid fired. Redundant with the spikeTrain defined in Synapse.

See Also:
Synapse.spikeTrain

profile

NeuroidProfile profile
Constructor Detail

Neuroid

public Neuroid(Area area)
and connects to area.

Method Detail

getSynapses

public Dendrite getSynapses()
Get the value of synapses.

Returns:
value of synapses.

getTimeLastFired

public double getTimeLastFired()
Get the value of timeLastFired.

Returns:
value of timeLastFired.

getArea

public Area getArea()
Get the value of area.

Returns:
value of area.

setArea

public void setArea(Area v)
Set the value of area.

Parameters:
v - Value to assign to area.

getConcept

public Concept getConcept()
Get the value of concept.

Returns:
value of concept.

getId

public int getId()
Get the value of id.

Returns:
value of id.

getMode

public Neuroid.Mode getMode()
Get the value of mode.

Returns:
value of mode.

setMode

public void setMode(Neuroid.Mode v)
Set the value of mode and connects any profilers if watched.

Parameters:
v - Value to assign to mode.

isDebug

public boolean isDebug()
Get the value of debug.

Returns:
value of debug.

setDebug

public void setDebug(boolean v)
Set the value of debug.

Parameters:
v - Value to assign to debug.

isWatch

public boolean isWatch()
Get the value of watch.

Returns:
value of watch.

setWatch

public void setWatch(boolean v)
Set the value of watch. if watched, create a NeuroidProfile object.

Parameters:
v - Value to assign to watch.

getSpikeTrain

public Vector getSpikeTrain()
Get the value of spikeTrain.

Returns:
value of spikeTrain.

setSpikeTrain

public void setSpikeTrain(Vector v)
Set the value of spikeTrain.

Parameters:
v - Value to assign to spikeTrain.

getProfile

public NeuroidProfile getProfile()
Get the value of profile.

Returns:
value of profile.

setProfile

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

Parameters:
v - Value to assign to profile.

init

public final void init()
N/A

Specified by:
init in interface Simulation

fire

public void fire()
Fires the neuroid. Neuroid contact container Area to propagate the spike along its axon. Adds an entry to spikeTrain if being watched.

Specified by:
fire in interface Input
See Also:
Area.fireNeuroid(neuroidnet.ntr.Neuroid), watch

step

public void step()
Update state of the Neuroid. Use the UMT algorithm by default, though behavior will depend on Synapse parameters.

Specified by:
step in interface Simulation
See Also:
Synapse

stop

public void stop()
N/A

Specified by:
stop in interface Simulation

calculatePotential

protected abstract void calculatePotential()
Calculate the potential here.

See Also:
potential

makeConcept

void makeConcept()
           throws ConceptSaturatedException
Create new concept. Trace back synapses that made this neuroid go to UM mode to find concept set. Then look for associated concept in conceptArea, otherwise create new Concept using this concept set.

TODO: destroy old concept if it exists.

Throws:
ConceptSaturatedException
See Also:
ConceptArea, Concept, ConceptSaturatedException

addSynapse

public int addSynapse(Synapse synapse)
Add synapse to synapses and return index to become the id of the Synapse. Analogous to Area.addNeuroid()

Parameters:
synapse - a Synapse to add to synapses
Returns:
an int value, the index of new synapse in synapses
See Also:
Area.addNeuroid(neuroidnet.ntr.Neuroid)

toString

public String toString()
Identify the neuroid with its id and area.

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

getStatus

public String getStatus()
Output of toString() plus potential, mode status, last fire time, and concept name.

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

getProperties

public String getProperties()
Describe in higher detail. List all contained synapses.

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

dumpData

public String dumpData()
Deprecated. Use plots and the profile gathering system.

Dump synaptic activity to output (matlab format). Called by: TODO: optionally in gnuplot format?

See Also:
ConceptArea#dumpData