Auryn simulator
v0.8.1-206-gb56e451
Plastic Spiking Neural Network Simulator
|
Stimulator class to add values in each timestep to arbitrary neuronal states. More...
#include <CurrentInjector.h>
Public Member Functions | |
CurrentInjector (NeuronGroup *target, std::string neuron_state_name="mem", AurynFloat initial_current=0.0) | |
Default Constructor. More... | |
void | set_target_state (std::string state_name="mem") |
Sets the state to add the "current" in every timestep to. More... | |
virtual | ~CurrentInjector () |
Default Destructor. More... | |
void | set_current (NeuronID i, AurynFloat current) |
Sets current strengh for neuron i. More... | |
void | set_all_currents (AurynFloat current) |
Sets current strength for all neurons. More... | |
void | execute () |
Protected Attributes | |
NeuronGroup * | dst |
Protected Attributes inherited from auryn::Device | |
std::string | device_name |
Identifying name for device. More... | |
bool | active |
Standard active switch. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from auryn::Device | |
void | init () |
Standard initializer to be called by the constructor. More... | |
virtual void | virtual_serialize (boost::archive::binary_oarchive &ar, const unsigned int version) |
virtual void | virtual_serialize (boost::archive::binary_iarchive &ar, const unsigned int version) |
Device () | |
Standard constructor. More... | |
void | set_name (std::string s) |
Set device name. More... | |
std::string | get_name () |
Get device name. More... | |
int | get_id () |
Get numeric device id. More... | |
virtual void | flush () |
Flush to file. More... | |
virtual | ~Device () |
Standard destructor. More... | |
virtual void | evolve () |
Stimulator class to add values in each timestep to arbitrary neuronal states.
Most commonly used to inject "currents" to arbitraty neuronal states. Maintains an internal vector with numbers which are added (times auryn_timestep) in each timestep to the neuronal target vector (per default that is the membrane voltage and hence the operation corresponds to injecting a current). Note that because of this current units of CurrentInjector are in a sense arbitrary because they depend on the neuron model.
CurrentInjector::CurrentInjector | ( | NeuronGroup * | target, |
std::string | neuron_state_name = "mem" , |
||
AurynFloat | initial_current = 0.0 |
||
) |
Default Constructor.
|
virtual |
Implementation of necessary propagate() function.
Reimplemented from auryn::Device.
void CurrentInjector::set_all_currents | ( | AurynFloat | current | ) |
Sets current strength for all neurons.
This must be a valid state vector name (default = mem)
current | Current value to set |
void CurrentInjector::set_current | ( | NeuronID | i, |
AurynFloat | current | ||
) |
Sets current strengh for neuron i.
This must be a valid state vector name (default = mem)
i | Index of neuron |
current | Current value to set |
void CurrentInjector::set_target_state | ( | std::string | state_name = "mem" | ) |
Sets the state to add the "current" in every timestep to.
|
protected |
The target NeuronGroup