#include <Neuron.h>
Public Member Functions | |
| Neuron () | |
| virtual | ~Neuron () |
| virtual void | calculateFinalState ()=0 |
| virtual void | changePostSynapticPotential (double amount, unsigned int preSynapticNeuronID)=0 |
| virtual const string * | getDescription ()=0 |
| virtual bool | setParameters (map< string, double > paramMap)=0 |
| virtual void | parametersChanged ()=0 |
| virtual string | getMonitoringInfo () |
| virtual MonitorData * | getMonitoringData () |
| void | fireNeuron () |
| int | getNeuronFireCount () |
| unsigned int | getNeuronID () |
Protected Attributes | |
| unsigned int | neuronID |
| SimulationClock * | simulationClock |
| double | neuronFireTime |
| int | neuronFireCount |
| void * | synapseMapPtr |
| vector< void * > | preSynapseVector |
| MonitorData | monitorData |
Private Member Functions | |
| void | printConnections () |
| void | setNeuronID (unsigned int neuronID) |
| void | setSimulationClock (SimulationClock *simClock) |
| void | setSynapseMapPtr (void *synMapPtr) |
Private Attributes | |
| TaskHolder ** | spikeTaskHolderArray |
| unsigned int | numberOfSpikeTaskHolders |
| NeuronTaskHolder * | neuronTaskHolder |
| map< int, vector< ConnectionHolder > > | connectionMap |
| unsigned short * | connectionArray |
| unsigned int | numberOfConnections |
| int | bufferInsertionPoint |
| int | destTID |
Friends | |
| class | SpikeStreamSimulation |
During a time step each firing synapse changes the membrane potential of the neuron if it decides to pass on the spike. This changing of the membrane potential should call the update method of the neuron if the neuron's state has not already been updated in that time step. Finally when all spikes have been received, the function calculateFinalState() is called instructing the neuron to decide whether it should fire or not. This is because excitatory and inhibitory spikes can arrive simultaneously within the same time step, so the final neuron state can only be calculated after all spikes have arrived.
NOTE Neuron ids from 0-10 are reserved and should never appear in the database
NOTE When the synapse potential is changed as a way of injecting noise the preSynapticNeuronID in changeMembranePotential will be set to zero.
Definition at line 67 of file Neuron.h.
|
|
Constructor. Definition at line 33 of file Neuron.cpp. References monitorData, neuronFireCount, and neuronFireTime. |
|
|
Destructor. Definition at line 46 of file Neuron.cpp. References connectionArray, and spikeTaskHolderArray. |
|
|
Calculates the final state of the neuron after all spikes have been received. The neuron should be updated by this method if it is not updated already. Referenced by SpikeStreamSimulation::sendSpikeMessages(). |
|
||||||||||||
|
Referenced by SpikeStreamSimulation::fireRandomNeurons_synaptic(), and DeviceManager::updateNeurons(). |
|
|
This function fires the neuron and adds a reference to the list of synapse ids that it connects to to the appropriate task holder. These task ids are then copied directly into the message buffer when the spike lists are sent. Definition at line 65 of file Neuron.cpp. References TaskHolder::bufferCounter, bufferInsertionPoint, connectionMap, destTID, NeuronTaskHolder::firingNeuronVector, SimulationClock::getSimulationTime(), TaskHolder::messageSpikeCount, neuronFireCount, neuronFireTime, neuronID, neuronTaskHolder, numberOfSpikeTaskHolders, TaskHolder::primaryDestinationID, simulationClock, TaskHolder::spikeMessageBuffer, and spikeTaskHolderArray. Referenced by PatternManager::fireNeurons(), SpikeStreamSimulation::fireRandomNeurons(), SpikeStreamSimulation::fireSpecifiedNeurons(), SpikeStreamSimulation::injectNoise(), and DeviceManager::updateNeurons(). |
|
|
Returns a description of this neuron class for debugging only. Destruction of the new string is the responsibility of the invoking method. Referenced by ClassLoader::getNewNeuron(), and ClassLoader::loadNeuronClasses(). |
|
|
Returns a monitor data struct (defined in GlobalVariables.h) containing the data that is being monitored. This returned data must match that defined in the string returned by getMonitoringInfo() Definition at line 112 of file Neuron.cpp. References monitorData. Referenced by SpikeStreamSimulation::sendSpikeMessages(). |
|
|
This method returns an string containing an XML description of the variables that are available for monitoring within this class. Overload this method and getMonitoringData() if you want to send monitoring information back to the main application. This will enable you to view a graph of the membrane potential, for example. Definition at line 119 of file Neuron.cpp. |
|
|
Returns the number of times the neuron has fired since the beginning of the simulation. Definition at line 129 of file Neuron.cpp. References neuronFireCount. |
|
|
Accesses the neuronID of this neuron. Definition at line 135 of file Neuron.cpp. References neuronID. Referenced by Synapse::print(). |
|
|
Called after the parameters have been statically changed to inform each neuron class that the parameters have been changed. This enables them to update their learning state, for example, after learning has been switched off. Referenced by SpikeStreamSimulation::loadNeuronParameters(). |
|
|
Prints all of the connections. Definition at line 145 of file Neuron.cpp. References connectionArray, connectionMap, neuronID, numberOfConnections, and numberOfSpikeTaskHolders. |
|
|
Sets the neuron ID. This cannot be done in the constructor since an array of neurons is created all at once using empty constructors when the neuron array is declared. Definition at line 174 of file Neuron.cpp. References neuronID. Referenced by SpikeStreamSimulation::loadNeurons(). |
|
|
Sets the parameters of the neuron. These should be defined in their own database, whose name is listed in the NeuronTypes database. This is called on only one instance of the neuron class with the parameters being set and held statically. The parametersChanged() method is called after the static setting of the parameters to inform each neuron class that the parameters have changed. Referenced by SpikeStreamSimulation::loadNeuronParameters(). |
|
|
Store reference to simulation clock. Definition at line 183 of file Neuron.cpp. References simulationClock. Referenced by SpikeStreamSimulation::loadNeurons(). |
|
|
Passes a pointer to the synapse map Note that this is of type: dense_hash_map<unsigned int, dense_hash_map<unsigned int, Synapse*, hash<unsigned int> >*, hash<unsigned int> > I.E. it is a dense_hash_map containing pointers to further dense hash maps See the SpikeStreamSimulation code for examples of iterating through and accessing this map. Definition at line 192 of file Neuron.cpp. References synapseMapPtr. Referenced by SpikeStreamSimulation::loadNeurons(). |
|
|
|
|
|
Declare bufferInsertionPoint here to save redeclaring it in fireNeuron each time method is called. Definition at line 189 of file Neuron.h. Referenced by fireNeuron(). |
|
|
Holds the complete list of synapse ids that this neuron is connected to These are compressed by subtracting the start neuron ID from the neuron ID When messages are unpacked the start neuron ID is added back on to get the correct neuron ID. Connection holders point to parts of this array. Definition at line 180 of file Neuron.h. Referenced by SpikeStreamSimulation::loadNeurons(), printConnections(), and ~Neuron(). |
|
|
The connection map connects task IDs with vectors of connection Holders The connectionHolders in each vector are destined for the same task, but each has a different delay and is inserted into a different spike buffer. Definition at line 174 of file Neuron.h. Referenced by fireNeuron(), SpikeStreamSimulation::loadNeurons(), printConnections(), and SpikeStreamSimulation::setMaxBufferSize(). |
|
|
Declare destTID here to save redeclaring it in fireNeuron each time method is called. Definition at line 193 of file Neuron.h. Referenced by fireNeuron(). |
|
|
Holds the monitoring data for the neuron. Definition at line 153 of file Neuron.h. Referenced by getMonitoringData(), and Neuron(). |
|
|
Number of times neuron has fired since the beginning of the simulation. Definition at line 140 of file Neuron.h. Referenced by fireNeuron(), getNeuronFireCount(), and Neuron(). |
|
|
Time at which neuron last fired. Definition at line 137 of file Neuron.h. Referenced by fireNeuron(), and Neuron(). |
|
|
ID of this neuron. Definition at line 130 of file Neuron.h. Referenced by fireNeuron(), getNeuronID(), printConnections(), and setNeuronID(). |
|
|
Reference to the neuron task holder for this neuron group. Definition at line 166 of file Neuron.h. Referenced by fireNeuron(), and SpikeStreamSimulation::loadNeurons(). |
|
|
The number of synapse ids in the connectionArray, which is not its length because each compressed neuron ID is an unsigned short and so two fit into a single unsigned integer. Definition at line 185 of file Neuron.h. Referenced by SpikeStreamSimulation::loadNeurons(), and printConnections(). |
|
|
Size of spikeTaskHolderArray. Definition at line 163 of file Neuron.h. Referenced by fireNeuron(), SpikeStreamSimulation::loadNeurons(), and printConnections(). |
|
|
Pointer to all the synpse classes that connect to this neuron Stored as void pointer to avoid include problems. |
|
|
Reference to the main simulation clock. Definition at line 134 of file Neuron.h. Referenced by fireNeuron(), and setSimulationClock(). |
|
|
Array containing references to all the spike task holders that this neuron communicates with. Definition at line 160 of file Neuron.h. Referenced by fireNeuron(), SpikeStreamSimulation::loadNeurons(), and ~Neuron(). |
|
|
Pointer to the synapse map, which is used by some neuron models. Uses void pointer to avoid include problems. The type of this map is: dense_hash_map<unsigned int, dense_hash_map<unsigned int, Synapse*, hash<unsigned int> >*, hash<unsigned int> > See SpikeStreamSimulation for more details about this map. Definition at line 146 of file Neuron.h. Referenced by setSynapseMapPtr(). |
1.4.4