NEST
2.6.0,not_revisioned_source_dir@0
|
Base class for all NEST network objects. More...
#include <node.h>
Public Member Functions | |
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_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... | |
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 | calibrate ()=0 |
Re-calculate dependent parameters of the node. More... | |
virtual void | finalize () |
Finalize node. More... | |
virtual void | update (Time const &, const long_t, const long_t)=0 |
Bring the node from state $t$ to $t+n*dt$. 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 | send_test_event (Node &receiving_node, rport receptor_type, synindex syn_id, bool dummy_target) |
Send an event to the receiving_node passed as an argument. More... | |
virtual port | handles_test_event (SpikeEvent &, rport receptor_type) |
Check if the node can handle a particular event and receptor type. More... | |
virtual port | handles_test_event (RateEvent &, rport receptor_type) |
virtual port | handles_test_event (DataLoggingRequest &, rport receptor_type) |
virtual port | handles_test_event (CurrentEvent &, 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 (SpikeEvent &e) |
Handle incoming spike events. More... | |
virtual void | handle (RateEvent &e) |
Handler for rate events. More... | |
virtual void | handle (DataLoggingRequest &e) |
Handler for universal data logging request. More... | |
virtual void | handle (DataLoggingReply &e) |
Handler for universal data logging request. More... | |
virtual void | handle (CurrentEvent &e) |
Handler for current events. 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) |
Static Public Member Functions | |
static Network * | network () |
Return pointer to network driver class. More... | |
Protected Member Functions | |
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... | |
virtual void | init_state_ (Node const &)=0 |
Private function to initialize the state of a node to model defaults. More... | |
virtual void | init_buffers_ ()=0 |
Private function to initialize the buffers of a node. 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 | |
static Network * | net_ =NULL |
Pointer to global network driver. More... | |
Private Member Functions | |
Node & | operator= (const Node &) |
not implemented More... | |
void | set_lid_ (index) |
Set local id, relative to the parent subnet. More... | |
void | set_parent_ (Subnet *) |
Set pointer to parent subnet. More... | |
void | set_gid_ (index) |
Set global node id. More... | |
void | set_subnet_index_ (index) |
Index into node array in subnet. More... | |
virtual DictionaryDatum | get_status_dict_ () |
Return a new dictionary datum . More... | |
Private Attributes | |
index | gid_ |
Global element id (within network). More... | |
index | lid_ |
Local element id (within parent). More... | |
index | subnet_index_ |
Index of node in parent's node array. More... | |
index | thread_lid_ |
Local id of this node in the thread-local vector of nodes. More... | |
int | model_id_ |
Model ID. More... | |
Subnet * | parent_ |
Pointer to parent. More... | |
thread | thread_ |
thread node is assigned to More... | |
thread | vp_ |
virtual process node is assigned to More... | |
bool | frozen_ |
node shall not be updated if true More... | |
bool | buffers_initialized_ |
Buffers have been initialized. More... | |
Friends | |
class | Network |
class | Scheduler |
class | Subnet |
class | proxynode |
class | Synapse |
class | Model |
Base class for all NEST network objects.
Class Node is the top of the simulation object hierarchy. It defines the most general interface to a network element.
Class Node provide the interface for
nest::Node::Node | ( | ) |
nest::Node::Node | ( | Node const & | n | ) |
|
virtual |
Referenced by nest::Network::destruct_nodes_().
|
inline |
True if buffers have been initialized.
References buffers_initialized_.
|
pure virtual |
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.
Implemented in nest::iaf_psc_delta_canon, nest::spike_generator, nest::iaf_psc_alpha_canon, nest::iaf_cond_alpha_mc, nest::Multimeter, nest::pp_pop_psc_delta, nest::pp_psc_delta, nest::hh_psc_alpha, nest::Subnet, nest::iaf_psc_exp_ps, nest::amat2_psc_exp, nest::iaf_psc_alpha_presc, nest::ht_neuron, nest::correlation_detector, nest::iaf_tum_2000, nest::aeif_cond_exp, nest::iaf_psc_alpha, nest::correlomatrix_detector, nest::mat2_psc_exp, nest::iaf_psc_delta, nest::iaf_neuron, nest::aeif_cond_alpha, nest::iaf_psc_exp, nest::sinusoidal_gamma_generator, nest::iaf_cond_alpha, nest::iaf_cond_exp_sfa_rr, nest::hh_cond_exp_traub, nest::iaf_chxk_2008, nest::aeif_cond_alpha_RK5, nest::volume_transmitter, nest::music_message_in_proxy, nest::mip_generator, nest::iaf_cond_exp, nest::sli_neuron, nest::izhikevich, nest::noise_generator, nest::poisson_generator, nest::iaf_chs_2007, nest::spike_detector, nest::spin_detector, nest::aeif_cond_alpha_multisynapse, nest::parrot_neuron, nest::sinusoidal_poisson_generator, nest::music_event_in_proxy, nest::parrot_neuron_ps, nest::music_event_out_proxy, nest::ppd_sup_generator, nest::SiblingContainer, nest::music_cont_in_proxy, nest::gamma_sup_generator, nest::poisson_generator_ps, nest::iaf_psc_alpha_multisynapse, nest::pulsepacket_generator, nest::dc_generator, nest::iaf_psc_exp_multisynapse, nest::proxynode, nest::step_current_generator, nest::ac_generator, nest::binary_neuron< TGainfunction >, nest::ConnTestDummyNodeBase, and nest::relaxos_van_der_pol.
Referenced by nest::Scheduler::prepare_node_().
|
inlinevirtual |
Virtual copy constructor.
This function should create a new object by calling the derived class' copy constructor and return its pointer.
|
protected |
Auxiliary function to downcast a Node to a concrete class derived from Node.
References assert(), and nest::names::n.
Referenced by nest::aeif_cond_alpha_multisynapse::init_state_().
|
virtual |
Modify Event object parameters during event delivery.
Some Nodes want to perform a function on an event for each of their targets. An example is the poisson_generator which needs to draw a random number for each target. The DSSpikeEvent, DirectSendingSpikeEvent, calls sender->event_hook(thread, *this) in its operator() function instead of calling target->handle(). The default implementation of Node::event_hook() just calls target->handle(DSSpikeEvent&). Any reimplementation must also execute this call. Otherwise the event will not be delivered. If needed, target->handle(DSSpikeEvent) may be called more than once.
Reimplemented in nest::spike_generator, nest::sinusoidal_gamma_generator, nest::mip_generator, nest::poisson_generator, nest::ppd_sup_generator, nest::sinusoidal_poisson_generator, nest::gamma_sup_generator, and nest::poisson_generator_ps.
References nest::Event::get_receiver(), and handle().
Referenced by nest::DSSpikeEvent::operator()(), and nest::DSCurrentEvent::operator()().
|
virtual |
Reimplemented in nest::noise_generator.
References nest::Event::get_receiver(), and handle().
|
inlinevirtual |
Finalize node.
Override this function if a node needs to "wrap up" things after a simulation, i.e., before Scheduler::resume() returns. Typical use-cases are devices that need to flush buffers or disconnect from external files or pipes.
Reimplemented in nest::Multimeter, nest::spike_detector, and nest::spin_detector.
Referenced by nest::Scheduler::prepare_nodes().
|
inline |
Return global Network ID.
Returns the global network ID of the Node. Each node has a unique network ID which can be used to access the Node comparable to a pointer. By definition, the top-level subnet has ID=0.
References gid_.
Referenced by nest::SparseNodeArray::add_local_node(), nest::Subnet::add_node(), nest::Network::add_node(), nest::Network::connect(), nest::ConnectionCreator::connect_(), nest::ConnectionCreator::connect_to_target_(), nest::Network::convergent_connect(), nest::AbstractLayer::create_layer(), nest::Network::divergent_connect(), nest::NestModule::CurrentSubnetFunction::execute(), nest::TargetIdentifierPtrRport::get_status(), nest::STDPDopaCommonProperties::get_status(), get_status_base(), nest::STDPDopaCommonProperties::get_vt_gid(), nest::SparseNodeArray::NodeEntry_::NodeEntry_(), nest::Network::send(), nest::Network::send_local(), nest::Scheduler::send_offgrid_remote(), nest::Scheduler::send_remote(), set_status_base(), and nest::ConnBuilder::single_connect_().
|
virtual |
return the spike history for (t1,t2].
UnexpectedEvent |
Reimplemented in nest::Archiving_Node.
Referenced by nest::STDPConnection< targetidentifierT >::send(), nest::STDPPLConnectionHom< targetidentifierT >::send(), nest::STDPConnectionHom< targetidentifierT >::send(), and nest::STDPDopaConnection< targetidentifierT >::send().
return the Kminus value at t (in ms).
UnexpectedEvent |
Reimplemented in nest::Archiving_Node.
Referenced by nest::STDPConnection< targetidentifierT >::send(), nest::STDPPLConnectionHom< targetidentifierT >::send(), nest::STDPConnectionHom< targetidentifierT >::send(), and nest::STDPDopaConnection< targetidentifierT >::send().
write the Kminus and triplet_Kminus values at t (in ms) to the provided locations.
UnexpectedEvent |
Reimplemented in nest::Archiving_Node.
|
inline |
Return local node ID.
Returns the ID of the node within the parent subject. Local IDs start with 0.
References lid_.
Referenced by nest::TopologyModule::Displacement_a_iFunction::execute(), nest::TopologyModule::Distance_a_iFunction::execute(), and get_status_base().
|
protected |
References nest::Network::get_model(), model_id_, and net_.
|
inline |
Return model ID of the node.
Returns the model ID of the model for this node. Model IDs start with 0, Subnet always having ID 0.
References model_id_.
Referenced by nest::Subnet::add_node(), nest::Network::reset_network(), and nest::proxynode::send_test_event().
std::string nest::Node::get_name | ( | ) | const |
Return class name.
Returns name of node model (e.g. "iaf_neuron") as string. This name is identical to the name that is used to identify the model in the interpreter's model dictionary.
References nest::Network::get_model(), nest::Model::get_name(), model_id_, and net_.
Referenced by nest::correlation_detector::correlation_detector(), nest::correlomatrix_detector::correlomatrix_detector(), get_status_base(), nest::iaf_psc_exp_multisynapse::handles_test_event(), nest::iaf_psc_alpha_multisynapse::handles_test_event(), nest::music_event_out_proxy::handles_test_event(), nest::parrot_neuron_ps::handles_test_event(), nest::sinusoidal_poisson_generator::handles_test_event(), nest::parrot_neuron::handles_test_event(), nest::aeif_cond_alpha_multisynapse::handles_test_event(), nest::izhikevich::handles_test_event(), nest::sli_neuron::handles_test_event(), nest::iaf_chs_2007::handles_test_event(), nest::spin_detector::handles_test_event(), nest::iaf_cond_exp::handles_test_event(), nest::spike_detector::handles_test_event(), nest::aeif_cond_alpha_RK5::handles_test_event(), nest::iaf_chxk_2008::handles_test_event(), nest::volume_transmitter::handles_test_event(), nest::hh_cond_exp_traub::handles_test_event(), nest::iaf_cond_alpha::handles_test_event(), nest::sinusoidal_gamma_generator::handles_test_event(), nest::iaf_cond_exp_sfa_rr::handles_test_event(), nest::iaf_psc_exp::handles_test_event(), nest::mat2_psc_exp::handles_test_event(), nest::aeif_cond_alpha::handles_test_event(), nest::iaf_neuron::handles_test_event(), nest::ht_neuron::handles_test_event(), nest::iaf_psc_alpha_presc::handles_test_event(), nest::hh_psc_alpha::handles_test_event(), nest::iaf_psc_delta::handles_test_event(), nest::iaf_psc_exp_ps::handles_test_event(), nest::aeif_cond_exp::handles_test_event(), nest::iaf_psc_alpha::handles_test_event(), nest::iaf_tum_2000::handles_test_event(), nest::correlomatrix_detector::handles_test_event(), nest::correlation_detector::handles_test_event(), nest::amat2_psc_exp::handles_test_event(), nest::iaf_psc_alpha_canon::handles_test_event(), nest::pp_psc_delta::handles_test_event(), nest::pp_pop_psc_delta::handles_test_event(), nest::iaf_cond_alpha_mc::handles_test_event(), nest::iaf_psc_delta_canon::handles_test_event(), nest::noise_generator::noise_generator(), nest::Subnet::print_network(), nest::noise_generator::Parameters_::set(), nest::correlomatrix_detector::Parameters_::set(), nest::correlation_detector::Parameters_::set(), set_status_base(), nest::aeif_cond_alpha_multisynapse::update(), and nest::ht_neuron::update().
|
inline |
Return pointer to parent subnet.
Each node is member of a subnet whose pointer can be accessed through this function. This pointer must be non NULL for all Nodes which are not the top-level subnet. Only the top-level subnet returns NULL.
References parent_.
Referenced by nest::TopologyModule::GetPosition_iFunction::execute(), nest::TopologyModule::Displacement_a_iFunction::execute(), nest::TopologyModule::Distance_a_iFunction::execute(), and nest::LocalNodeListIterator::operator++().
DictionaryDatum nest::Node::get_status_base | ( | ) |
Return a dictionary with the node's properties.
get_status_base() first gets a dictionary with the basic information of an element, using get_status_dict_(). It then calls the custom function get_status(DictionaryDatum) with the created status dictionary as argument.
References assert(), nest::names::element_type, nest::names::frozen, get_gid(), get_lid(), get_name(), get_status(), get_status_dict_(), get_thread(), get_thread_lid(), get_vp(), nest::names::global_id, is_frozen(), is_local(), nest::names::local, nest::names::local_id, nest::names::model, nest::names::neuron, nest::names::parent, parent_, nest::names::thread, nest::names::thread_local_id, lockPTR< D >::valid(), and nest::names::vp.
Referenced by nest::Network::get_status().
|
privatevirtual |
Return a new dictionary datum .
This function is called by get_status_base() and returns a new empty dictionary by default. Some nodes may contain a permanent status dictionary which is then returned by get_status_dict_().
Reimplemented in nest::sli_neuron.
Referenced by get_status_base().
|
inline |
Return the index to the node in the node array of the parent subnet.
References subnet_index_.
Referenced by nest::TopologyModule::GetPosition_iFunction::execute(), and nest::LocalNodeListIterator::operator++().
|
inline |
Retrieve the number of the thread to which the node is assigned.
References thread_.
Referenced by nest::cg_connect(), nest::Network::connect(), nest::OneToOneBuilder::connect_(), nest::AllToAllBuilder::connect_(), nest::FixedInDegreeBuilder::connect_(), nest::FixedOutDegreeBuilder::connect_(), nest::FixedTotalNumberBuilder::connect_(), nest::BernoulliBuilder::connect_(), nest::Network::convergent_connect(), nest::Network::divergent_connect(), nest::ConnectionCreator::divergent_connect_(), nest::NestModule::Connect_i_i_lFunction::execute(), nest::NestModule::Connect_i_i_d_d_lFunction::execute(), nest::NestModule::Connect_i_i_D_lFunction::execute(), get_status_base(), nest::Scheduler::prepare_nodes(), nest::Network::random_convergent_connect(), and nest::Network::send().
|
inline |
get thread local index
References thread_lid_.
Referenced by get_status_base(), and nest::TargetIdentifierIndex::set_target().
Return the specified member of a SiblingContainer.
This method is meaningful only for SiblingContainer, for which it returns the pointer to the indexed node in the container. For all other models (including Subnet), it returns a null pointer and throws and assertion.By defining the method in this way, we avoid many dynamic casts.
Reimplemented in nest::SiblingContainer.
References assert().
Referenced by nest::Network::destruct_nodes_(), nest::Network::get_node(), nest::Scheduler::prepare_nodes(), and nest::Network::set_status().
Return specified member of a SiblingContainer, with access control.
Reimplemented in nest::SiblingContainer.
References assert().
|
inline |
Retrieve the number of the virtual process to which the node is assigned.
References vp_.
Referenced by get_status_base(), and nest::Scheduler::is_local_node().
|
virtual |
Reimplemented in nest::iaf_psc_delta_canon, nest::iaf_cond_alpha_mc, nest::pp_pop_psc_delta, nest::pp_psc_delta, nest::iaf_psc_alpha_canon, nest::amat2_psc_exp, nest::iaf_tum_2000, nest::aeif_cond_exp, nest::iaf_psc_alpha, nest::iaf_psc_exp_ps, nest::iaf_psc_delta, nest::hh_psc_alpha, nest::ht_neuron, nest::iaf_psc_alpha_presc, nest::iaf_neuron, nest::aeif_cond_alpha, nest::mat2_psc_exp, nest::iaf_psc_exp, nest::iaf_cond_exp_sfa_rr, nest::iaf_cond_alpha, nest::sinusoidal_gamma_generator, nest::hh_cond_exp_traub, nest::aeif_cond_alpha_RK5, nest::iaf_chxk_2008, nest::iaf_cond_exp, nest::iaf_chs_2007, nest::sli_neuron, nest::aeif_cond_alpha_multisynapse, nest::izhikevich, nest::sinusoidal_poisson_generator, nest::StaticConnection< targetidentifierT >::ConnTestDummyNode, nest::iaf_psc_alpha_multisynapse, nest::StaticConnectionHomW< targetidentifierT >::ConnTestDummyNode, nest::iaf_psc_exp_multisynapse, nest::binary_neuron< TGainfunction >, and nest::relaxos_van_der_pol.
|
virtual |
Reimplemented in nest::iaf_psc_delta_canon, nest::iaf_cond_alpha_mc, nest::pp_pop_psc_delta, nest::pp_psc_delta, nest::iaf_psc_alpha_canon, nest::amat2_psc_exp, nest::iaf_tum_2000, nest::aeif_cond_exp, nest::iaf_psc_alpha, nest::iaf_psc_exp_ps, nest::iaf_psc_delta, nest::hh_psc_alpha, nest::ht_neuron, nest::iaf_psc_alpha_presc, nest::iaf_neuron, nest::aeif_cond_alpha, nest::mat2_psc_exp, nest::iaf_psc_exp, nest::iaf_cond_exp_sfa_rr, nest::iaf_cond_alpha, nest::hh_cond_exp_traub, nest::aeif_cond_alpha_RK5, nest::iaf_chxk_2008, nest::iaf_cond_exp, nest::sli_neuron, nest::izhikevich, nest::ContDelayConnection< targetidentifierT >::ConnTestDummyNode, nest::aeif_cond_alpha_multisynapse, nest::StaticConnection< targetidentifierT >::ConnTestDummyNode, nest::iaf_psc_alpha_multisynapse, nest::StaticConnectionHomW< targetidentifierT >::ConnTestDummyNode, nest::iaf_psc_exp_multisynapse, nest::binary_neuron< TGainfunction >, and nest::relaxos_van_der_pol.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
inlinevirtual |
Returns true if the node has proxies on remote threads.
This is used to discriminate between different types of nodes, when adding new nodes to the network.
Reimplemented in nest::spike_generator, nest::Multimeter, nest::sinusoidal_gamma_generator, nest::correlation_detector, nest::correlomatrix_detector, nest::music_message_in_proxy, nest::mip_generator, nest::volume_transmitter, nest::poisson_generator, nest::sinusoidal_poisson_generator, nest::noise_generator, nest::spike_detector, nest::spin_detector, nest::music_event_in_proxy, nest::music_cont_in_proxy, nest::ppd_sup_generator, nest::music_event_out_proxy, nest::gamma_sup_generator, nest::poisson_generator_ps, nest::pulsepacket_generator, nest::Subnet, nest::dc_generator, nest::step_current_generator, nest::ac_generator, and nest::SiblingContainer.
Referenced by nest::Network::connect(), nest::Network::convergent_connect(), and nest::Network::send().
void nest::Node::init_buffers | ( | ) |
Initialize buffers of a node.
This function initializes the Buffers of a Node, e.g., ring buffers for incoming events, buffers for logging potentials. This function is called before Simulate is called for the first time on a node, but not upon resumption of a simulation. This is a wrapper function, which calls the overloaded Node::init_buffers_() worker only if the buffers of the node have not been initialized yet.
References buffers_initialized_, and init_buffers_().
Referenced by nest::Scheduler::prepare_node_().
|
protectedpure virtual |
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.
Implemented in nest::iaf_psc_delta_canon, nest::spike_generator, nest::iaf_psc_alpha_canon, nest::iaf_cond_alpha_mc, nest::Multimeter, nest::pp_pop_psc_delta, nest::pp_psc_delta, nest::hh_psc_alpha, nest::iaf_psc_exp_ps, nest::Subnet, nest::amat2_psc_exp, nest::iaf_psc_alpha_presc, nest::ht_neuron, nest::correlation_detector, nest::iaf_tum_2000, nest::aeif_cond_exp, nest::iaf_psc_alpha, nest::correlomatrix_detector, nest::mat2_psc_exp, nest::iaf_psc_delta, nest::iaf_neuron, nest::aeif_cond_alpha, nest::iaf_psc_exp, nest::sinusoidal_gamma_generator, nest::iaf_cond_alpha, nest::iaf_cond_exp_sfa_rr, nest::hh_cond_exp_traub, nest::iaf_chxk_2008, nest::aeif_cond_alpha_RK5, nest::volume_transmitter, nest::music_message_in_proxy, nest::mip_generator, nest::iaf_cond_exp, nest::sli_neuron, nest::izhikevich, nest::poisson_generator, nest::iaf_chs_2007, nest::spike_detector, nest::spin_detector, nest::aeif_cond_alpha_multisynapse, nest::noise_generator, nest::parrot_neuron, nest::sinusoidal_poisson_generator, nest::music_event_in_proxy, nest::parrot_neuron_ps, nest::music_event_out_proxy, nest::ppd_sup_generator, nest::music_cont_in_proxy, nest::SiblingContainer, nest::gamma_sup_generator, nest::poisson_generator_ps, nest::iaf_psc_alpha_multisynapse, nest::pulsepacket_generator, nest::dc_generator, nest::iaf_psc_exp_multisynapse, nest::proxynode, nest::step_current_generator, nest::ac_generator, nest::binary_neuron< TGainfunction >, nest::ConnTestDummyNodeBase, and nest::relaxos_van_der_pol.
Referenced by init_buffers().
void nest::Node::init_state | ( | ) |
Set state variables to the default values for the model.
Dynamic variables are all observable state variables of a node that change during Node::update(). After calling init_state(), the state variables should have the same values that they had after the node was created. In practice, they will be initialized to the values of the prototype node (model).
References assert(), nest::Network::get_model(), nest::Model::get_prototype(), init_state_(), nest::names::model, model_id_, and net_.
Referenced by nest::Network::init_state(), nest::ac_generator::init_state_(), nest::step_current_generator::init_state_(), nest::dc_generator::init_state_(), nest::pulsepacket_generator::init_state_(), nest::gamma_sup_generator::init_state_(), nest::poisson_generator_ps::init_state_(), nest::ppd_sup_generator::init_state_(), nest::sinusoidal_poisson_generator::init_state_(), nest::noise_generator::init_state_(), nest::spin_detector::init_state_(), nest::spike_detector::init_state_(), nest::poisson_generator::init_state_(), nest::mip_generator::init_state_(), nest::sinusoidal_gamma_generator::init_state_(), nest::correlomatrix_detector::init_state_(), nest::correlation_detector::init_state_(), nest::spike_generator::init_state_(), and nest::Network::reset_network().
|
protectedpure virtual |
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. |
Implemented in nest::iaf_psc_delta_canon, nest::spike_generator, nest::iaf_psc_alpha_canon, nest::iaf_cond_alpha_mc, nest::Multimeter, nest::pp_pop_psc_delta, nest::pp_psc_delta, nest::hh_psc_alpha, nest::iaf_psc_exp_ps, nest::Subnet, nest::amat2_psc_exp, nest::iaf_psc_alpha_presc, nest::ht_neuron, nest::correlation_detector, nest::iaf_tum_2000, nest::aeif_cond_exp, nest::iaf_psc_alpha, nest::correlomatrix_detector, nest::mat2_psc_exp, nest::iaf_psc_delta, nest::iaf_neuron, nest::aeif_cond_alpha, nest::iaf_psc_exp, nest::sinusoidal_gamma_generator, nest::iaf_cond_alpha, nest::iaf_cond_exp_sfa_rr, nest::hh_cond_exp_traub, nest::iaf_chxk_2008, nest::aeif_cond_alpha_RK5, nest::volume_transmitter, nest::music_message_in_proxy, nest::mip_generator, nest::iaf_cond_exp, nest::sli_neuron, nest::izhikevich, nest::poisson_generator, nest::iaf_chs_2007, nest::spike_detector, nest::spin_detector, nest::aeif_cond_alpha_multisynapse, nest::noise_generator, nest::parrot_neuron, nest::sinusoidal_poisson_generator, nest::music_event_in_proxy, nest::parrot_neuron_ps, nest::music_event_out_proxy, nest::ppd_sup_generator, nest::music_cont_in_proxy, nest::SiblingContainer, nest::gamma_sup_generator, nest::poisson_generator_ps, nest::iaf_psc_alpha_multisynapse, nest::pulsepacket_generator, nest::dc_generator, nest::iaf_psc_exp_multisynapse, nest::proxynode, nest::step_current_generator, nest::ac_generator, nest::binary_neuron< TGainfunction >, nest::ConnTestDummyNodeBase, and nest::relaxos_van_der_pol.
Referenced by init_state().
|
inline |
Returns true if node is frozen, i.e., shall not be updated.
References frozen_.
Referenced by get_status_base().
bool nest::Node::is_local | ( | ) | const |
Returns true if the node is allocated in the local process.
References is_proxy().
Referenced by get_status_base().
|
inline |
Returns true if node is model prototype.
References nest::invalid_thread_, and vp_.
Referenced by nest::poisson_generator_ps::send_test_event(), nest::ppd_sup_generator::send_test_event(), nest::sinusoidal_gamma_generator::send_test_event(), nest::Multimeter::send_test_event(), nest::sinusoidal_poisson_generator::Parameters_::set(), and nest::sinusoidal_gamma_generator::Parameters_::set().
|
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 in nest::iaf_psc_delta_canon, nest::iaf_psc_alpha_canon, nest::iaf_psc_exp_ps, nest::iaf_psc_alpha_presc, nest::iaf_chxk_2008, nest::parrot_neuron_ps, nest::ppd_sup_generator, nest::gamma_sup_generator, and nest::poisson_generator_ps.
|
inlinevirtual |
Returns true if the node is a proxy node.
This is implemented because the use of RTTI is rather expensive.
Reimplemented in nest::proxynode.
Referenced by nest::Network::connect(), nest::Network::convergent_connect(), nest::Network::divergent_connect(), is_local(), nest::Network::is_local_node(), and nest::Network::set_status_single_node_().
|
virtual |
Reimplemented in nest::Layer< D >, nest::Subnet, and nest::SiblingContainer.
Referenced by nest::NestModule::ChangeSubnet_iFunction::execute(), and nest::Scheduler::prepare_nodes().
|
inlinevirtual |
Returns true if the node only receives events from nodes/devices on the same thread.
Reimplemented in nest::sinusoidal_gamma_generator, nest::volume_transmitter, nest::sinusoidal_poisson_generator, nest::spike_detector, nest::spin_detector, and nest::music_event_out_proxy.
Referenced by nest::Network::connect().
|
inlinestatic |
Return pointer to network driver class.
References net_.
Referenced by nest::RecordingDevice::build_filename_(), nest::RecordingDevice::calibrate(), nest::RecordingDevice::finalize(), nest::Model::get_status(), nest::iaf_psc_exp_multisynapse::handle(), nest::iaf_psc_alpha_multisynapse::handle(), nest::parrot_neuron_ps::handle(), nest::parrot_neuron::handle(), nest::aeif_cond_alpha_multisynapse::handle(), nest::iaf_psc_alpha::handle(), nest::iaf_psc_delta_canon::handle(), nest::music_event_in_proxy::music_event_in_proxy(), nest::proxynode::proxynode(), nest::Selector::Selector(), nest::Quantal_StpConnection< targetidentifierT >::send(), nest::proxynode::send_test_event(), nest::RecordingDevice::Parameters_::set(), nest::spike_generator::set_status(), nest::iaf_psc_exp_multisynapse::update(), nest::iaf_psc_alpha_multisynapse::update(), nest::parrot_neuron_ps::update(), nest::parrot_neuron::update(), nest::aeif_cond_alpha_multisynapse::update(), nest::iaf_psc_alpha::update(), nest::ht_neuron::update(), and nest::Multimeter::update().
|
inlineprotectedvirtual |
Return the number of thread siblings in SiblingContainer.
This method is meaningful only for SiblingContainer, for which it returns the number of siblings in the container. For all other models (including Subnet), it returns 0, which is not wrong. By defining the method in this way, we avoid many dynamic casts.
Reimplemented in nest::SiblingContainer.
Referenced by nest::Network::destruct_nodes_(), nest::Network::get_node(), nest::Network::get_thread_siblings(), nest::Scheduler::prepare_nodes(), nest::Network::reset_network(), and nest::Network::set_status().
|
inlinevirtual |
Returns true if the node exists only once per process, but does not have proxies on remote threads.
This is used to discriminate between different types of nodes, when adding new nodes to the network.
Reimplemented in nest::music_message_in_proxy, nest::music_event_in_proxy, nest::music_cont_in_proxy, and nest::music_event_out_proxy.
|
inlinevirtual |
Returns true for potential global receivers (e.g.
spike_detector) and false otherwise
Reimplemented in nest::spike_detector.
|
inlinevirtual |
Prints out one line of the tree view of the network.
Reimplemented in nest::Subnet.
|
virtual |
Register a STDP connection.
Default implementation of register_stdp_connection() just throws IllegalConnection.
IllegalConnection |
Reimplemented in nest::Archiving_Node.
Referenced by nest::STDPConnection< targetidentifierT >::check_connection(), nest::STDPPLConnectionHom< targetidentifierT >::check_connection(), nest::STDPConnectionHom< targetidentifierT >::check_connection(), nest::STDPDopaConnection< targetidentifierT >::check_connection(), and nest::STDPFACETSHWConnectionHom< targetidentifierT >::check_connection().
|
virtual |
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 in nest::spike_generator, nest::iaf_psc_delta_canon, nest::Multimeter, nest::iaf_cond_alpha_mc, nest::pp_pop_psc_delta, nest::iaf_psc_alpha_canon, nest::pp_psc_delta, nest::amat2_psc_exp, nest::iaf_psc_exp_ps, nest::iaf_tum_2000, nest::aeif_cond_exp, nest::iaf_psc_alpha, nest::mat2_psc_exp, nest::iaf_psc_delta, nest::hh_psc_alpha, nest::ht_neuron, nest::iaf_psc_alpha_presc, nest::iaf_neuron, nest::aeif_cond_alpha, nest::iaf_psc_exp, nest::iaf_cond_alpha, nest::iaf_cond_exp_sfa_rr, nest::sinusoidal_gamma_generator, nest::hh_cond_exp_traub, nest::mip_generator, nest::iaf_chxk_2008, nest::aeif_cond_alpha_RK5, nest::poisson_generator, nest::izhikevich, nest::noise_generator, nest::iaf_cond_exp, nest::iaf_chs_2007, nest::sli_neuron, nest::aeif_cond_alpha_multisynapse, nest::music_event_in_proxy, nest::parrot_neuron, nest::ppd_sup_generator, nest::parrot_neuron_ps, nest::sinusoidal_poisson_generator, nest::gamma_sup_generator, nest::poisson_generator_ps, nest::pulsepacket_generator, nest::dc_generator, nest::iaf_psc_alpha_multisynapse, nest::step_current_generator, nest::ac_generator, nest::iaf_psc_exp_multisynapse, nest::proxynode, nest::binary_neuron< TGainfunction >, and nest::relaxos_van_der_pol.
Referenced by nest::Connection< targetidentifierT >::check_connection_().
|
inline |
References buffers_initialized_.
Referenced by nest::Network::reset_network().
|
inlineprotected |
Mark node as frozen.
References nest::names::frozen, and frozen_.
Referenced by nest::proxynode::proxynode(), nest::SiblingContainer::SiblingContainer(), and nest::Subnet::Subnet().
|
inlineprivate |
Set global node id.
References gid_.
Referenced by nest::Network::add_node(), nest::Network::init_(), and nest::proxynode::proxynode().
|
virtual |
Sets has_proxies_ member variable (to switch to global spike detection mode)
Reimplemented in nest::spike_detector.
Referenced by nest::Network::add_node().
|
inlineprivate |
Set local id, relative to the parent subnet.
References lid_.
Referenced by nest::Subnet::add_node().
|
virtual |
Sets local_receiver_ member variable (to switch to global spike detection mode)
Reimplemented in nest::spike_detector.
Referenced by nest::Network::add_node().
|
inline |
Set the model id.
This method is called by Network::add_node() when a node is created.
References model_id_.
Referenced by nest::Network::add_node(), nest::Network::copy_model(), nest::Network::init_(), nest::proxynode::proxynode(), and nest::Network::register_model().
|
inlineprivate |
Set pointer to parent subnet.
References nest::names::c, and parent_.
Referenced by nest::Subnet::add_node(), and nest::proxynode::proxynode().
void nest::Node::set_status_base | ( | const DictionaryDatum & | dict | ) |
Set status dictionary of a node.
Forwards to set_status() of the derived class.
References assert(), numerics::e, nest::names::frozen, frozen_, get_gid(), get_name(), nest::BadProperty::message(), set_status(), and lockPTR< D >::valid().
Referenced by nest::Network::restore_nodes(), and nest::Network::set_status_single_node_().
|
inlineprivate |
|
inline |
Store the number of the thread to which the node is assigned.
The assignment is done after node creation by the Network class.
References thread_.
Referenced by nest::Network::add_node(), and nest::Network::init_().
|
inline |
|
inline |
Store the number of the virtual process to which the node is assigned.
This is assigned to the node in network::add_node().
References nest::names::vp, and vp_.
Referenced by nest::Network::add_node(), nest::Network::init_(), and nest::proxynode::proxynode().
|
virtual |
Unregister a STDP connection.
Default implementation of unregister_stdp_connection() just throws IllegalConnection.
IllegalConnection |
Reimplemented in nest::Archiving_Node.
Bring the node from state $t$ to $t+n*dt$.
n->update(T, from, to) performs the update steps beginning at T+from .. T+to-1, ie, emitting events with time stamps T+from+1 .. T+to.
Time | network time at beginning of time slice. |
long_t | initial step inside time slice |
long_t | post-final step inside time slice |
Implemented in nest::iaf_psc_delta_canon, nest::iaf_psc_alpha_canon, nest::spike_generator, nest::Multimeter, nest::iaf_psc_exp_ps, nest::iaf_cond_alpha_mc, nest::iaf_psc_alpha_presc, nest::pp_pop_psc_delta, nest::pp_psc_delta, nest::hh_psc_alpha, nest::Subnet, nest::amat2_psc_exp, nest::ht_neuron, nest::correlation_detector, nest::iaf_tum_2000, nest::iaf_psc_alpha, nest::aeif_cond_exp, nest::correlomatrix_detector, nest::iaf_psc_delta, nest::mat2_psc_exp, nest::iaf_neuron, nest::aeif_cond_alpha, nest::iaf_psc_exp, nest::sinusoidal_gamma_generator, nest::iaf_cond_alpha, nest::iaf_cond_exp_sfa_rr, nest::hh_cond_exp_traub, nest::iaf_chxk_2008, nest::aeif_cond_alpha_RK5, nest::spike_detector, nest::volume_transmitter, nest::music_message_in_proxy, nest::spin_detector, nest::mip_generator, nest::sli_neuron, nest::iaf_cond_exp, nest::izhikevich, nest::noise_generator, nest::poisson_generator, nest::iaf_chs_2007, nest::aeif_cond_alpha_multisynapse, nest::sinusoidal_poisson_generator, nest::parrot_neuron, nest::music_event_in_proxy, nest::ppd_sup_generator, nest::parrot_neuron_ps, nest::music_event_out_proxy, nest::gamma_sup_generator, nest::poisson_generator_ps, nest::music_cont_in_proxy, nest::SiblingContainer, nest::iaf_psc_alpha_multisynapse, nest::pulsepacket_generator, nest::dc_generator, nest::iaf_psc_exp_multisynapse, nest::proxynode, nest::binary_neuron< TGainfunction >, nest::step_current_generator, nest::ac_generator, nest::ConnTestDummyNodeBase, and nest::relaxos_van_der_pol.
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
private |
Buffers have been initialized.
Referenced by buffers_initialized(), init_buffers(), and set_buffers_initialized().
|
private |
node shall not be updated if true
Referenced by is_frozen(), set_frozen_(), and set_status_base().
|
private |
Global element id (within network).
Referenced by get_gid(), and set_gid_().
|
private |
Local element id (within parent).
Referenced by get_lid(), and set_lid_().
|
private |
Model ID.
It is only set for actual node instances, not for instances of class Node representing model prototypes. Model prototypes always have model_id_==-1.
Referenced by get_model_(), get_model_id(), get_name(), init_state(), and set_model_id().
|
staticprotected |
Pointer to global network driver.
Referenced by nest::AbstractLayer::create_layer(), get_model_(), get_name(), init_state(), nest::Network::Network(), and network().
|
private |
Pointer to parent.
Referenced by get_parent(), get_status_base(), and set_parent_().
|
private |
Index of node in parent's node array.
Referenced by get_subnet_index(), and set_subnet_index_().
|
private |
thread node is assigned to
Referenced by get_thread(), and set_thread().
|
private |
Local id of this node in the thread-local vector of nodes.
Referenced by get_thread_lid(), and set_thread_lid().
|
private |
virtual process node is assigned to
Referenced by get_vp(), is_model_prototype(), and set_vp().