NEST
2.6.0,not_revisioned_source_dir@0
|
Leaky iaf neuron, alpha PSC synapses, canonical implementation. More...
#include <iaf_psc_alpha_canon.h>
Classes | |
struct | Buffers_ |
Buffers of the model. More... | |
struct | Parameters_ |
Independent parameters of the model. More... | |
struct | State_ |
State variables of the model. More... | |
struct | Variables_ |
Internal variables of the model. More... | |
Public Member Functions | |
iaf_psc_alpha_canon () | |
Basic constructor. More... | |
iaf_psc_alpha_canon (const iaf_psc_alpha_canon &) | |
Copy constructor. More... | |
port | send_test_event (Node &, rport, synindex, bool) |
Send an event to the receiving_node passed as an argument. More... | |
port | handles_test_event (SpikeEvent &, rport) |
Check if the node can handle a particular event and receptor type. More... | |
port | handles_test_event (CurrentEvent &, rport) |
port | handles_test_event (DataLoggingRequest &, rport) |
void | handle (SpikeEvent &) |
Handle incoming spike events. More... | |
void | handle (CurrentEvent &) |
Handler for current events. More... | |
void | handle (DataLoggingRequest &) |
Handler for universal data logging request. More... | |
bool | is_off_grid () const |
Returns true if the node if it sends/receives -grid events This is used to discriminate between different types of nodes, when adding new nodes to the network. More... | |
void | get_status (DictionaryDatum &) const |
void | set_status (const DictionaryDatum &) |
Public Member Functions inherited from nest::Node | |
Node () | |
Node (Node const &) | |
virtual | ~Node () |
virtual Node * | clone () const |
Virtual copy constructor. More... | |
virtual bool | has_proxies () const |
Returns true if the node has proxies on remote threads. More... | |
virtual bool | potential_global_receiver () const |
Returns true for potential global receivers (e.g. More... | |
virtual void | set_has_proxies (const bool) |
Sets has_proxies_ member variable (to switch to global spike detection mode) More... | |
virtual void | set_local_receiver (const bool) |
Sets local_receiver_ member variable (to switch to global spike detection mode) More... | |
virtual bool | local_receiver () const |
Returns true if the node only receives events from nodes/devices on the same thread. More... | |
virtual bool | one_node_per_process () const |
Returns true if the node exists only once per process, but does not have proxies on remote threads. More... | |
virtual bool | is_proxy () const |
Returns true if the node is a proxy node. More... | |
std::string | get_name () const |
Return class name. More... | |
index | get_gid () const |
Return global Network ID. More... | |
index | get_lid () const |
Return local node ID. More... | |
index | get_subnet_index () const |
Return the index to the node in the node array of the parent subnet. More... | |
int | get_model_id () const |
Return model ID of the node. More... | |
Subnet * | get_parent () const |
Return pointer to parent subnet. More... | |
virtual std::string | print_network (int, int, std::string="") |
Prints out one line of the tree view of the network. More... | |
bool | is_frozen () const |
Returns true if node is frozen, i.e., shall not be updated. More... | |
bool | is_local () const |
Returns true if the node is allocated in the local process. More... | |
void | init_state () |
Set state variables to the default values for the model. More... | |
void | init_buffers () |
Initialize buffers of a node. More... | |
virtual void | finalize () |
Finalize node. More... | |
virtual void | set_status (const DictionaryDatum &)=0 |
Change properties of the node according to the entries in the dictionary. More... | |
virtual void | get_status (DictionaryDatum &) const =0 |
Export properties of the node by setting entries in the status dictionary. More... | |
virtual port | handles_test_event (RateEvent &, rport receptor_type) |
virtual port | handles_test_event (ConductanceEvent &, rport receptor_type) |
virtual port | handles_test_event (DoubleDataEvent &, rport receptor_type) |
virtual port | handles_test_event (DSSpikeEvent &, rport receptor_type) |
virtual port | handles_test_event (DSCurrentEvent &, rport receptor_type) |
virtual void | register_stdp_connection (double_t) |
Register a STDP connection. More... | |
virtual void | unregister_stdp_connection (double_t) |
Unregister a STDP connection. More... | |
virtual void | handle (RateEvent &e) |
Handler for rate events. More... | |
virtual void | handle (DataLoggingReply &e) |
Handler for universal data logging request. More... | |
virtual void | handle (ConductanceEvent &e) |
Handler for conductance events. More... | |
virtual void | handle (DoubleDataEvent &e) |
Handler for DoubleData events. More... | |
virtual double_t | get_K_value (double_t t) |
return the Kminus value at t (in ms). More... | |
virtual void | get_K_values (double_t t, double_t &Kminus, double_t &triplet_Kminus) |
write the Kminus and triplet_Kminus values at t (in ms) to the provided locations. More... | |
virtual void | get_history (double_t t1, double_t t2, std::deque< histentry >::iterator *start, std::deque< histentry >::iterator *finish) |
return the spike history for (t1,t2]. More... | |
virtual void | event_hook (DSSpikeEvent &) |
Modify Event object parameters during event delivery. More... | |
virtual void | event_hook (DSCurrentEvent &) |
void | set_thread (thread) |
Store the number of the thread to which the node is assigned. More... | |
thread | get_thread () const |
Retrieve the number of the thread to which the node is assigned. More... | |
void | set_vp (thread) |
Store the number of the virtual process to which the node is assigned. More... | |
thread | get_vp () const |
Retrieve the number of the virtual process to which the node is assigned. More... | |
void | set_model_id (int) |
Set the model id. More... | |
virtual bool | is_subnet () const |
DictionaryDatum | get_status_base () |
Return a dictionary with the node's properties. More... | |
void | set_status_base (const DictionaryDatum &) |
Set status dictionary of a node. More... | |
bool | is_model_prototype () const |
Returns true if node is model prototype. More... | |
void | set_thread_lid (const index) |
set thread local index More... | |
index | get_thread_lid () const |
get thread local index More... | |
bool | buffers_initialized () const |
True if buffers have been initialized. More... | |
void | set_buffers_initialized (bool initialized) |
Private Member Functions | |
void | set_spiketime (Time const &) |
void | propagate_ (const double_t dt) |
Propagate neuron state. More... | |
void | emit_spike_ (Time const &origin, const long_t lag, const double_t t0, const double_t dt) |
Emit a single spike caused by DC current in absence of spike input. More... | |
void | emit_instant_spike_ (Time const &origin, const long_t lag, const double_t spike_offset) |
Emit a single spike at a precisely given time. More... | |
double_t | get_V_m_ () const |
Read out the real membrane potential. More... | |
double_t | get_y1_ () const |
Read out state variable y1. More... | |
double_t | get_y2_ () const |
Read out state variable y2. More... | |
Interface functions | |
| |
void | init_state_ (const Node &proto) |
Private function to initialize the state of a node to model defaults. More... | |
void | init_buffers_ () |
Private function to initialize the buffers of a node. More... | |
void | calibrate () |
Re-calculate dependent parameters of the node. More... | |
void | update (Time const &origin, const long_t from, const long_t to) |
Time Evolution Operator. More... | |
Private Attributes | |
Parameters_ | P_ |
State_ | S_ |
Variables_ | V_ |
Buffers_ | B_ |
Static Private Attributes | |
static RecordablesMap < iaf_psc_alpha_canon > | recordablesMap_ |
Mapping of recordables names to access functions. More... | |
Friends | |
class | RecordablesMap< iaf_psc_alpha_canon > |
class | UniversalDataLogger< iaf_psc_alpha_canon > |
Threshold-crossing interpolation | |
These functions determine the time of threshold crossing using interpolation, one function per interpolation order. thresh_find() is the driver function and the only one to be called directly. | |
enum | interpOrder { NO_INTERPOL, LINEAR, QUADRATIC, CUBIC, END_INTERP_ORDER } |
Interpolation orders. More... | |
double_t | thresh_find_ (double_t const) const |
Localize threshold crossing. More... | |
double_t | thresh_find1_ (double_t const) const |
double_t | thresh_find2_ (double_t const) const |
double_t | thresh_find3_ (double_t const) const |
Additional Inherited Members | |
Static Public Member Functions inherited from nest::Node | |
static Network * | network () |
Return pointer to network driver class. More... | |
Protected Member Functions inherited from nest::Node | |
virtual size_t | num_thread_siblings_ () const |
Return the number of thread siblings in SiblingContainer. More... | |
virtual Node * | get_thread_sibling_ (index) const |
Return the specified member of a SiblingContainer. More... | |
virtual Node * | get_thread_sibling_safe_ (index) const |
Return specified member of a SiblingContainer, with access control. More... | |
Model & | get_model_ () const |
void | set_frozen_ (bool frozen) |
Mark node as frozen. More... | |
template<typename ConcreteNode > | |
const ConcreteNode & | downcast (const Node &) |
Auxiliary function to downcast a Node to a concrete class derived from Node. More... | |
Static Protected Attributes inherited from nest::Node | |
static Network * | net_ =NULL |
Pointer to global network driver. More... | |
Leaky iaf neuron, alpha PSC synapses, canonical implementation.
|
private |
nest::iaf_psc_alpha_canon::iaf_psc_alpha_canon | ( | ) |
Basic constructor.
This constructor should only be used by GenericModel to create model prototype instances.
References recordablesMap_.
nest::iaf_psc_alpha_canon::iaf_psc_alpha_canon | ( | const iaf_psc_alpha_canon & | n | ) |
Copy constructor.
GenericModel::allocate_() uses the copy constructor to clone actual model instances from the prototype instance.
|
privatevirtual |
Re-calculate dependent parameters of the node.
This function is called each time a simulation is begun/resumed. It must re-calculate all internal Variables of the node required for spike handling or updating the node.
Implements nest::Node.
References assert(), numerics::e, numerics::expm1(), nest::Time::get_ms(), nest::Time::get_resolution(), and nest::Time::get_steps().
|
private |
Emit a single spike at a precisely given time.
origin | Time stamp at beginning of slice |
lag | Time step within slice |
spike_offset | Time offset for spike |
References assert(), nest::Time::get_steps(), and nest::Event::set_offset().
|
private |
Emit a single spike caused by DC current in absence of spike input.
Emits a single spike and reset neuron given that the membrane potential was below threshold at the beginning of a mini-timestep and above afterwards.
origin | Time stamp at beginning of slice |
lag | Time step within slice |
t0 | Beginning of mini-timestep |
dt | Duration of mini-timestep |
References nest::Time::get_steps(), and nest::Event::set_offset().
|
inline |
|
inlineprivate |
Read out the real membrane potential.
References nest::iaf_psc_alpha_canon::Parameters_::E_L_, P_, S_, and nest::iaf_psc_alpha_canon::State_::y3_.
Referenced by nest::RecordablesMap< HostNode >::create().
|
inlineprivate |
Read out state variable y1.
References S_, and nest::iaf_psc_alpha_canon::State_::y1_.
Referenced by nest::RecordablesMap< HostNode >::create().
|
inlineprivate |
Read out state variable y2.
References S_, and nest::iaf_psc_alpha_canon::State_::y2_.
Referenced by nest::RecordablesMap< HostNode >::create().
|
virtual |
Handle incoming spike events.
Default implementation of event handlers just throws an UnexpectedEvent exception.
thrd | Id of the calling thread. |
e | Event object. |
This handler has to be implemented if a Node should accept spike events.
UnexpectedEvent | This is the default event to throw. |
Reimplemented from nest::Node.
References assert(), nest::Event::get_delay(), nest::SpikeEvent::get_multiplicity(), nest::Event::get_offset(), nest::Event::get_rel_delivery_steps(), nest::Event::get_stamp(), nest::Time::get_steps(), and nest::Event::get_weight().
|
virtual |
Handler for current events.
UnexpectedEvent |
Reimplemented from nest::Node.
References assert(), nest::names::c, nest::CurrentEvent::get_current(), nest::Event::get_delay(), nest::Event::get_rel_delivery_steps(), nest::Event::get_weight(), and nest::names::w.
|
virtual |
Handler for universal data logging request.
UnexpectedEvent |
Reimplemented from nest::Node.
|
inlinevirtual |
Check if the node can handle a particular event and receptor type.
This function is called upon connection setup by send_test_event().
handles_test_event() function is used to verify that the receiver can handle the event. It can also be used by the receiver to return information to the sender in form of the returned port. The default implementation throws an IllegalConnection exception. Any node class should define handles_test_event() functions for all those event types it can handle.
See Kunkel et al, Front Neuroinform 8:78 (2014), Sec 3.
IllegalConnection |
Reimplemented from nest::Node.
References nest::Node::get_name().
|
inlinevirtual |
Reimplemented from nest::Node.
References nest::Node::get_name().
|
inlinevirtual |
Reimplemented from nest::Node.
References B_, nest::Node::get_name(), nest::iaf_psc_alpha_canon::Buffers_::logger_, and recordablesMap_.
|
privatevirtual |
Private function to initialize the buffers of a node.
This function, which must be overloaded by all derived classes, provides the implementation for initializing the buffers of a node.
Implements nest::Node.
|
privatevirtual |
Private function to initialize the state of a node to model defaults.
This function, which must be overloaded by all derived classes, provides the implementation for initializing the state of a node to the model defaults; the state is the set of observable dynamic variables.
Reference | to model prototype object. |
Implements nest::Node.
References S_.
|
inlinevirtual |
Returns true if the node if it sends/receives -grid events This is used to discriminate between different types of nodes, when adding new nodes to the network.
Reimplemented from nest::Node.
|
private |
Propagate neuron state.
Propagate the neuron's state by dt.
dt | Interval over which to propagate |
References numerics::expm1().
|
inlinevirtual |
Send an event to the receiving_node passed as an argument.
Default implementation of check_connection just throws UnexpectedEvent.
This is required during the connection handshaking to test, if the receiving_node can handle the event type and receptor_type sent by the source node.
If dummy_target is true, this indicates that receiving_node is derived from ConnTestDummyNodeBase and used in the first call to send_test_event(). This can be ignored in most cases, but Nodes sending DS*Events to their own event hooks and then *Events to their proper targets must send DS*Events when called with the dummy target, and *Events when called with the real target, see #478.
Reimplemented from nest::Node.
References numerics::e, nest::Node::handles_test_event(), and nest::Event::set_sender().
|
inlineprivate |
References nest::Time::get_steps().
|
inline |
|
private |
References nest::names::tau.
|
private |
References nest::names::a, nest::names::b, nest::names::c, and nest::names::dt.
|
private |
References nest::names::a, nest::names::dt, nest::names::p, nest::names::phi, numerics::pi, nest::names::tau, and nest::names::u.
|
inlineprivate |
Localize threshold crossing.
Driver function to invoke the correct interpolation function for the chosen interpolation order.
double_t | length of interval since previous event |
References nest::names::dt.
|
privatevirtual |
Time Evolution Operator.
update() promotes the state of the neuron from origin+from to origin+to. It does so in steps of the resolution h. Within each step, time is advanced from event to event, as retrieved from the spike queue.
Return from refractoriness is handled as a special event in the queue, which is marked by a weight that is GSL_NAN. This greatly simplifies the code.
For steps, during which no events occur, the precomputed propagator matrix is used. For other steps, the propagator matrix is computed as needed.
While the neuron is refractory, membrane potential (y3_) is clamped to U_reset_.
Implements nest::Node.
References assert(), nest::Scheduler::get_min_delay(), and nest::Time::get_steps().
|
friend |
|
friend |
|
staticprivate |
Mapping of recordables names to access functions.
Referenced by get_status(), handles_test_event(), and iaf_psc_alpha_canon().