|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--neuroidnet.ntr.Area
Entity Area that holds neurons and keeps track of time.
| Field Summary | |
(package private) double |
activationThreshold
The threshold to change a Neuroid from AM to AM1 mode. |
protected Hashtable |
axons
Hash table holding the white matter, e.g. |
(package private) int |
conceptCount
Count of concept allocations made (via call to addArbitrarySynapses) in this Area. |
double |
deltaT
Increment of time for algorithms. |
(package private) Synapse |
fromInhibitorySynapseTemplate
The template used for creating synapses from the inhibitoryInterNeuroid |
int |
id
Id tag of the area. |
(package private) boolean |
inhibInter
True if the area contains a inhibitory inter-neuroid. |
(package private) Neuroid |
inhibitoryInterNeuroid
The global inhibitory neuroid that gets input from all and projects to all in the area. |
(package private) AxonArbor |
inhibitorySynapseVector
The axon emanating from the inhibitoryInterNeuroid |
(package private) Object |
isCalculating
Lock variable showing the thread is busy doing the calculations. |
(package private) Object |
isWaiting
Lock variable showing the thread is waiting for a step request. |
(package private) String |
name
Name of the Area for identification purposes. |
Network |
network
Pointer to parent network TODO: Fix access modifier from public, problem with SensoryNeuroid |
Vector |
neuroids
List of Neuroids contained in Area. |
protected int |
numberOfNeuroids
Number of Neuroids contained in Area. |
(package private) double |
period
Oscillation period of Neuroids. |
(package private) int |
replication
The replication factor, i.e. |
(package private) boolean |
stepRequested
Flag showing incoming requets to step(). |
(package private) Thread |
thread
Thread to do the actual calculations. |
double |
time
Time of the area. |
double |
timeConstantM
Membrane time constant of all neurons in this area. |
(package private) Synapse |
toInhibitorySynapseTemplate
The template used for creating synapses to the inhibitoryInterNeuroid |
| Constructor Summary | |
Area(Network network,
String name,
int numberOfNeuroids,
int replication,
double period,
double threshold,
boolean inhibInter,
double timeConstantM,
double refractoryTimeConstant,
Class neuroidClass)
Constructor with option to add inhibitory inter-neuron. |
|
Area(Network network,
String name,
int numberOfNeuroids,
int replication,
double period,
double threshold,
double timeConstantM,
double refractoryTimeConstant,
Class neuroidClass)
Constructor for plain Area (no inhibitory interneuron). |
|
| Method Summary | |
void |
addArbitrarySynapses(Synapse destSynapseTemplate,
Neuroid srcNeuroid,
int numberOfSynapses)
Hack to arbitrarily choose different neurons for each allocation of concepts. |
void |
addAxon(Neuroid srcNeuroid,
AxonArbor synapses)
Adds the synapses to the outgoing synapse record of the Area. |
int |
addNeuroid(Neuroid neuroid)
Adds a neuroid to the Area. |
void |
addRandomSynapses(Synapse destSynapseTemplate,
Neuroid srcNeuroid,
int numberOfSynapses)
Creates new numberOfSynapses Synapses for a given
srcNeuroid to a specified destination destArea. |
void |
connectToArea(AreaInt destArea,
double timeConstantS,
double delay,
double nuBoost)
Makes connections between this Area and the given destArea. |
(package private) void |
fireNeuroid(Neuroid neuroid)
Fires neuroid. |
double |
getActivationThreshold()
Get the value of activationThreshold. |
Hashtable |
getAxons()
Get the value of axons. |
String |
getName()
Get the value of name. |
int |
getNumberOfNeuroids()
Get the value of numberOfNeuroids. |
String |
getProperties()
Describe Area in more detail, including static properties. |
Neuroid |
getRandomNeuroid()
Returns a Neuroid which is a random member of the destArea. |
int |
getReplication()
Get the value of replication. |
String |
getStatus()
Mentions the time in addition to toString() contents. |
Thread |
getThread()
Get the value of thread. |
void |
init()
Does nothing. |
private void |
readObject(ObjectInputStream in)
Method called when a serialized object is loaded. |
void |
receiveSpike(Synapse synapse)
Public method to receive spikes from other areas. |
void |
run()
Check if step()ing requested, and serve the request. |
void |
setActivationThreshold(double v)
Set the value of activationThreshold. |
void |
setAxons(Hashtable v)
Set the value of axons. |
void |
setName(String v)
Set the value of name. |
void |
setNumberOfNeuroids(int v)
Set the value of numberOfNeuroids. |
void |
setReplication(int v)
Set the value of replication. |
void |
setThread(Thread v)
Set the value of thread. |
void |
step()
Updates the state of the Area. |
void |
stop()
Terminates the thread dedicated to this area. |
String |
toString()
Identifies are with its name. |
(package private) void |
updateTime()
Just increments the time by deltaT. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
String name
Area for identification purposes.
public double time
public double deltaT
deltaT in network.
Network.deltaTpublic int id
protected int numberOfNeuroids
Neuroids contained in Area.
TODO: should be obsolete, redundant info with size of neuroids vector.
neuroids,
Neuroidint replication
Neuroids allocated for each concept.
double period
Neuroids.
Neuroidpublic Vector neuroids
Neuroids contained in Area.
TODO: Fix access modifier from public, becuase of peripherals..
NeuroidNeuroid inhibitoryInterNeuroid
Synapse fromInhibitorySynapseTemplate
inhibitoryInterNeuroid
inhibitoryInterNeuroidSynapse toInhibitorySynapseTemplate
inhibitoryInterNeuroid
inhibitoryInterNeuroidAxonArbor inhibitorySynapseVector
init()protected Hashtable axons
Area connecting to Synapses of other Neuroids.
Returns a Vector of Synapses for every Neuroid key.
Synapse,
Neuroidtransient volatile Object isCalculating
stepRequested,
run(),
step()transient volatile Object isWaiting
stepRequested,
run(),
step()volatile boolean stepRequested
run(),
step()transient Thread thread
int conceptCount
Area.
addArbitrarySynapses(neuroidnet.ntr.Synapse, neuroidnet.ntr.Neuroid, int),
Peripheral.Conceptpublic Network network
boolean inhibInter
public double timeConstantM
double activationThreshold
Neuroid.step()| Constructor Detail |
public Area(Network network,
String name,
int numberOfNeuroids,
int replication,
double period,
double threshold,
double timeConstantM,
double refractoryTimeConstant,
Class neuroidClass)
network - a Network valuename - a String valuenumberOfNeuroids - an int valuereplication - an int valueperiod - a double valuethreshold - a double value#Area(Network,String,int,int,double,double,boolean,double,double)
public Area(Network network,
String name,
int numberOfNeuroids,
int replication,
double period,
double threshold,
boolean inhibInter,
double timeConstantM,
double refractoryTimeConstant,
Class neuroidClass)
Area instance with numberOfNeuroids of
Neuroids.
TODO: If a allocate-on-demand approach is used for Neuroids none should be allocated at this time.
TODO: Automatically add areas to network?
network - a Network valuename - a String valuenumberOfNeuroids - an int valuereplication - an int valueperiod - a double valuethreshold - a double valueinhibInter - a boolean valueNeuroid| Method Detail |
public String getName()
public void setName(String v)
v - Value to assign to name.public int getNumberOfNeuroids()
getNumberOfNeuroids in interface AreaIntpublic void setNumberOfNeuroids(int v)
v - Value to assign to numberOfNeuroids.public int getReplication()
getReplication in interface AreaIntpublic void setReplication(int v)
v - Value to assign to replication.public Hashtable getAxons()
public void setAxons(Hashtable v)
v - Value to assign to axons.public Thread getThread()
public void setThread(Thread v)
v - Value to assign to thread.public double getActivationThreshold()
public void setActivationThreshold(double v)
v - Value to assign to activationThreshold.public int addNeuroid(Neuroid neuroid)
Area. Determines a sequence number according to
the neuroid's order in the Vector neuroids.
if specified in the constructor, a simple lateral circuit is formed. A link from this
neuroid to the globally inhibitory neuroid is made.
neuroid - a Neuroid value to add into this Area
neuroids)Neuroid.id
public void connectToArea(AreaInt destArea,
double timeConstantS,
double delay,
double nuBoost)
Area and the given destArea.
Uses modified connection probability of random multipartite graphs to determine number
of Neuroids to be connected on destination Area.
connectToArea in interface AreaIntdestArea - the Area to which this one is connected.timeConstantS - time constant to be used in creating synapsesdelay - synaptic delaynuBoost - a double factor to multiply the original probability
ratio as to magnifyNeuroid,
Synapse
public void addAxon(Neuroid srcNeuroid,
AxonArbor synapses)
Area.
If synapses associated with srcNeuroid exist,
new synapses are just added to them.
TO DO: get a remote reference to an AxonArbor in the remote Area and put it in hash.
srcNeuroid - the presynaptic Neuroid in this Area.synapses - the Vector to be associated with srcNeuroid
public void addRandomSynapses(Synapse destSynapseTemplate,
Neuroid srcNeuroid,
int numberOfSynapses)
numberOfSynapses Synapses for a given
srcNeuroid to a specified destination destArea.
AxonArbor makes sure to return a set of synapses to distinct neurons (no repetitions!)
TODO: maybe put this method back into Area?
addRandomSynapse should automatically add the synapse?
addRandomSynapses in interface AreaIntdestSynapseTemplate - a Synapse valuesrcNeuroid - a Neuroid valuenumberOfSynapses - an int value
public void addArbitrarySynapses(Synapse destSynapseTemplate,
Neuroid srcNeuroid,
int numberOfSynapses)
conceptCount is used to interleave the allocated neurons.
Return a Vector of new numberOfSynapses Synapses.
AxonArbor makes sure to return a set of synapses to distinct neurons
(no repetitions!) Used from SensoryNeuroid.
addArbitrarySynapses in interface AreaIntdestSynapseTemplate - a Synapse valuesrcNeuroid - a Neuroid valuenumberOfSynapses - an int valueconceptCount,
periphery.SensoryNeuroid#SensoryNeuroidpublic Neuroid getRandomNeuroid()
Neuroid which is a random member of the destArea.
TODO: one might might pseudo-random (organized) behavior in selecting destinations (like addArbitrarySynapses).
TODO: If a allocate-on-demand approach is used for neuroids, in case of finding a non-existing neuroid should result in its creation.
Neuroid valueaddArbitrarySynapses(neuroidnet.ntr.Synapse, neuroidnet.ntr.Neuroid, int),
AxonArbor.destAreapublic void receiveSpike(Synapse synapse)
Synapse.receiveSpike() directly.
synapse - Synapse to spike.Synapsevoid updateTime()
deltaT.
Initial idea was to read current time from hardware clock.
TODO: extend this class for the parallel version. (should we?)
public void init()
init in interface Simulationpublic void step()
Area.
Updates all Neuroids contained within.
This method returns immediately, the thread does the calculation afterwards.
TODO: Should be called from a thread with certain frequency. (should it?)
step in interface AreaIntNeuroid,
run()public void stop()
stop in interface Simulationthreadvoid fireNeuroid(Neuroid neuroid)
receiveSpike
method of all Synapses.
TODO: Make it trigger the Axon to fire.
neuroid - Neuroid to fireNeuroid,
Synapse.receiveSpike()public String toString()
toString in interface ExpressivetoString in class ObjectString valuepublic String getStatus()
toString() contents.
getStatus in interface ExpressiveString valueExpressive.toString()public String getProperties()
Area in more detail, including static properties.
getProperties in interface ExpressiveString valueExpressive.getStatus()public void run()
run in interface Runnablestep()
private void readObject(ObjectInputStream in)
throws IOException,
ClassNotFoundException
transient thread variable.
in - a java.io.ObjectInputStream value
IOException - if an error occurs
ClassNotFoundException - if an error occurs
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||