Simulation of a single network. More...
Inherits nemo::ReadableNetwork.
Public Member Functions | |
| virtual const firing_output & | step ()=0 |
| virtual const firing_output & | step (const firing_stimulus &fstim)=0 |
| virtual const firing_output & | step (const current_stimulus &istim)=0 |
| virtual const firing_output & | step (const firing_stimulus &fstim, const current_stimulus &istim)=0 |
Modifying the network | |
| virtual void | setNeuron (unsigned idx, unsigned nargs, const float args[])=0 |
| void | setNeuron (unsigned idx, float a, float b, float c, float d, float u, float v, float sigma) |
| virtual void | setNeuronState (unsigned neuron, unsigned var, float value)=0 |
| virtual void | setNeuronParameter (unsigned neuron, unsigned parameter, float value)=0 |
| virtual void | applyStdp (float reward)=0 |
Queries | |
| virtual float | getNeuronState (unsigned neuron, unsigned var) const =0 |
| virtual float | getNeuronParameter (unsigned neuron, unsigned parameter) const =0 |
| virtual float | getMembranePotential (unsigned neuron) const =0 |
| virtual const std::vector < synapse_id > & | getSynapsesFrom (unsigned neuron)=0 |
Simulation (timing) | |
| virtual unsigned long | elapsedWallclock () const =0 |
| virtual unsigned long | elapsedSimulation () const =0 |
| virtual void | resetTimer ()=0 |
Simulation of a single network.
Concrete instances are created using the nemo::simulation factory function.
Internal errors are signaled by exceptions. Thrown exceptions are all of the type nemo::exception which in turn subclass std::exception.
| virtual const firing_output& nemo::Simulation::step | ( | ) | [pure virtual] |
Run simulation for a single cycle (1ms) without external stimulus
| virtual const firing_output& nemo::Simulation::step | ( | const firing_stimulus & | fstim | ) | [pure virtual] |
Run simulation for a single cycle (1ms) with firing stimulus
| fstim | An list of neurons, which will be forced to fire this cycle. |
| virtual const firing_output& nemo::Simulation::step | ( | const current_stimulus & | istim | ) | [pure virtual] |
Run simulation for a single cycle (1ms) with current stimulus
| istim | Optional per-neuron vector specifying externally provided input current for this cycle. |
| virtual const firing_output& nemo::Simulation::step | ( | const firing_stimulus & | fstim, | |
| const current_stimulus & | istim | |||
| ) | [pure virtual] |
Run simulation for a single cycle (1ms) with both firing stimulus and current stimulus
| fstim | An list of neurons, which will be forced to fire this cycle. | |
| istim | Optional per-neuron vector specifying externally provided input current for this cycle. |
| virtual void nemo::Simulation::setNeuron | ( | unsigned | idx, | |
| unsigned | nargs, | |||
| const float | args[] | |||
| ) | [pure virtual] |
Set an existing neuron
| idx | neuron index | |
| nargs | number of parameters and state variables | |
| args | parameters and state variables (in that order) of the neuron |
| void nemo::Simulation::setNeuron | ( | unsigned | idx, | |
| float | a, | |||
| float | b, | |||
| float | c, | |||
| float | d, | |||
| float | u, | |||
| float | v, | |||
| float | sigma | |||
| ) |
Change an existing Izhikevich neuron.
| virtual void nemo::Simulation::setNeuronState | ( | unsigned | neuron, | |
| unsigned | var, | |||
| float | value | |||
| ) | [pure virtual] |
Change a single state variable for an existing neuron
| neuron | neuron index | |
| var | state variable index | |
| value | new value of the state variable |
For the Izhikevich model variable indices 0=u, 1=v.
| virtual void nemo::Simulation::setNeuronParameter | ( | unsigned | neuron, | |
| unsigned | parameter, | |||
| float | value | |||
| ) | [pure virtual] |
Change a single parameter for an existing neuron
| neuron | neuron index | |
| parameter | parameter index | |
| value | new value of the state variable |
For the Izhikevich model the parameter indices are 0=a, 1=b, 2=c, 3=d, 4=sigma.
| virtual void nemo::Simulation::applyStdp | ( | float | reward | ) | [pure virtual] |
Update synapse weights using the accumulated STDP statistics
| reward | Multiplier for the accumulated weight change |
| virtual float nemo::Simulation::getNeuronState | ( | unsigned | neuron, | |
| unsigned | var | |||
| ) | const [pure virtual] |
Get a single state variable for a single neuron
| neuron | neuron index | |
| var | variable index |
For the Izhikevich model the variable indices are 0=u, 1=v.
| virtual float nemo::Simulation::getNeuronParameter | ( | unsigned | neuron, | |
| unsigned | parameter | |||
| ) | const [pure virtual] |
Get a single parameter for a single neuron
| neuron | neuron index | |
| parameter | parameter index |
For the Izhikevich model the parameter indices are 0=a, 1=b, 2=c, 3=d, 4=sigma.
| virtual float nemo::Simulation::getMembranePotential | ( | unsigned | neuron | ) | const [pure virtual] |
| virtual const std::vector<synapse_id>& nemo::Simulation::getSynapsesFrom | ( | unsigned | neuron | ) | [pure virtual] |
The vector reference is valid until the next call to this function.
Implements nemo::ReadableNetwork.
| virtual unsigned long nemo::Simulation::elapsedWallclock | ( | ) | const [pure virtual] |
| virtual unsigned long nemo::Simulation::elapsedSimulation | ( | ) | const [pure virtual] |
| virtual void nemo::Simulation::resetTimer | ( | ) | [pure virtual] |
Reset both wall-clock and simulation timer
1.6.3