NEST  2.6.0,not_revisioned_source_dir@0
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Attributes | Private Member Functions | Private Attributes | Friends | List of all members
nest::Node Class Referenceabstract

Base class for all NEST network objects. More...

#include <node.h>

Inheritance diagram for nest::Node:
nest::ac_generator nest::Archiving_Node nest::ConnTestDummyNodeBase nest::correlation_detector nest::correlomatrix_detector nest::dc_generator nest::gamma_sup_generator nest::iaf_psc_alpha_canon nest::iaf_psc_alpha_presc nest::iaf_psc_delta_canon nest::iaf_psc_exp_ps nest::mip_generator nest::Multimeter nest::music_cont_in_proxy nest::music_event_in_proxy nest::music_event_out_proxy nest::music_message_in_proxy nest::noise_generator nest::parrot_neuron_ps nest::poisson_generator nest::poisson_generator_ps nest::ppd_sup_generator nest::proxynode nest::pulsepacket_generator nest::SiblingContainer nest::sinusoidal_gamma_generator nest::sinusoidal_poisson_generator nest::spike_detector nest::spike_generator nest::spin_detector nest::step_current_generator nest::Subnet

Public Member Functions

 Node ()
 
 Node (Node const &)
 
virtual ~Node ()
 
virtual Nodeclone () 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...
 
Subnetget_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 Networknetwork ()
 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 Nodeget_thread_sibling_ (index) const
 Return the specified member of a SiblingContainer. More...
 
virtual Nodeget_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...
 
Modelget_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 Networknet_ =NULL
 Pointer to global network driver. More...
 

Private Member Functions

Nodeoperator= (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...
 
Subnetparent_
 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
 

Detailed Description

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

See also
class Event
Subnet

Constructor & Destructor Documentation

nest::Node::Node ( )
nest::Node::Node ( Node const &  n)
nest::Node::~Node ( )
virtual

Member Function Documentation

bool nest::Node::buffers_initialized ( ) const
inline

True if buffers have been initialized.

References buffers_initialized_.

virtual void nest::Node::calibrate ( )
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_().

virtual Node* nest::Node::clone ( ) const
inlinevirtual

Virtual copy constructor.

This function should create a new object by calling the derived class' copy constructor and return its pointer.

template<typename ConcreteNode >
const ConcreteNode & nest::Node::downcast ( const Node n)
protected

Auxiliary function to downcast a Node to a concrete class derived from Node.

Note
This function is used to convert generic Node references to specific ones when intializing parameters or state from a prototype.

References assert(), and nest::names::n.

Referenced by nest::aeif_cond_alpha_multisynapse::init_state_().

void nest::Node::event_hook ( DSSpikeEvent e)
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()().

void nest::Node::event_hook ( DSCurrentEvent e)
virtual

Reimplemented in nest::noise_generator.

References nest::Event::get_receiver(), and handle().

virtual void nest::Node::finalize ( )
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().

index nest::Node::get_gid ( ) const
inline
void nest::Node::get_history ( double_t  t1,
double_t  t2,
std::deque< histentry >::iterator *  start,
std::deque< histentry >::iterator *  finish 
)
virtual
double_t nest::Node::get_K_value ( double_t  t)
virtual
void nest::Node::get_K_values ( double_t  t,
double_t Kminus,
double_t triplet_Kminus 
)
virtual

write the Kminus and triplet_Kminus values at t (in ms) to the provided locations.

Exceptions
UnexpectedEvent

Reimplemented in nest::Archiving_Node.

index nest::Node::get_lid ( ) const
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().

Model & nest::Node::get_model_ ( ) const
protected
int nest::Node::get_model_id ( ) const
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.

Note
The model ID is not stored in the model prototype instance. It is only set when actual nodes are created from a prototype.

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().

Subnet * nest::Node::get_parent ( ) const
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().

DictionaryDatum nest::Node::get_status_dict_ ( )
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().

index nest::Node::get_subnet_index ( ) const
inline

Return the index to the node in the node array of the parent subnet.

Note
Since subnets no longer store non-local nodes, LIDs are no longer identical to these indices.

References subnet_index_.

Referenced by nest::TopologyModule::GetPosition_iFunction::execute(), and nest::LocalNodeListIterator::operator++().

thread nest::Node::get_thread ( ) const
inline
index nest::Node::get_thread_lid ( ) const
inline

get thread local index

References thread_lid_.

Referenced by get_status_base(), and nest::TargetIdentifierIndex::set_target().

virtual Node* nest::Node::get_thread_sibling_ ( index  ) const
inlineprotectedvirtual

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().

virtual Node* nest::Node::get_thread_sibling_safe_ ( index  ) const
inlineprotectedvirtual

Return specified member of a SiblingContainer, with access control.

Reimplemented in nest::SiblingContainer.

References assert().

thread nest::Node::get_vp ( ) const
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().

port nest::Node::handles_test_event ( RateEvent ,
rport  receptor_type 
)
virtual
port nest::Node::handles_test_event ( DataLoggingRequest ,
rport  receptor_type 
)
virtual
port nest::Node::handles_test_event ( CurrentEvent ,
rport  receptor_type 
)
virtual
port nest::Node::handles_test_event ( ConductanceEvent ,
rport  receptor_type 
)
virtual
port nest::Node::handles_test_event ( DoubleDataEvent ,
rport  receptor_type 
)
virtual
port nest::Node::handles_test_event ( DSSpikeEvent ,
rport  receptor_type 
)
virtual
port nest::Node::handles_test_event ( DSCurrentEvent ,
rport  receptor_type 
)
virtual
bool nest::Node::has_proxies ( ) const
inlinevirtual
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_().

virtual void nest::Node::init_buffers_ ( )
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.

See also
Node::init_buffers()

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).

Note
If the parameters of the model have been changes since the node was created, the node will be initialized to the present values set in the model.
This function is the public interface to the private function Node::init_state_(const Node&) that must be implemented by derived classes.

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().

virtual void nest::Node::init_state_ ( Node const &  )
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.

Parameters
Referenceto model prototype object.
See also
Node::init_state()
Note
To provide a reasonable behavior during the transition to the new scheme, init_state_() has a default implementation calling init_dynamic_state_().

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().

bool nest::Node::is_frozen ( ) const
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().

bool nest::Node::is_model_prototype ( ) const
inline
bool nest::Node::is_off_grid ( ) const
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.

bool nest::Node::is_proxy ( ) const
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_().

bool nest::Node::is_subnet ( ) const
virtual
bool nest::Node::local_receiver ( ) const
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().

Network * nest::Node::network ( )
inlinestatic
virtual size_t nest::Node::num_thread_siblings_ ( ) const
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().

bool nest::Node::one_node_per_process ( ) const
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.

Node& nest::Node::operator= ( const Node )
private

not implemented

bool nest::Node::potential_global_receiver ( ) const
inlinevirtual

Returns true for potential global receivers (e.g.

spike_detector) and false otherwise

Reimplemented in nest::spike_detector.

virtual std::string nest::Node::print_network ( int  ,
int  ,
std::string  = "" 
)
inlinevirtual

Prints out one line of the tree view of the network.

Reimplemented in nest::Subnet.

void nest::Node::register_stdp_connection ( double_t  )
virtual
port nest::Node::send_test_event ( Node receiving_node,
rport  receptor_type,
synindex  syn_id,
bool  dummy_target 
)
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_().

void nest::Node::set_buffers_initialized ( bool  initialized)
inline
void nest::Node::set_frozen_ ( bool  frozen)
inlineprotected
void nest::Node::set_gid_ ( index  i)
inlineprivate

Set global node id.

References gid_.

Referenced by nest::Network::add_node(), nest::Network::init_(), and nest::proxynode::proxynode().

void nest::Node::set_has_proxies ( const bool  )
virtual

Sets has_proxies_ member variable (to switch to global spike detection mode)

Reimplemented in nest::spike_detector.

Referenced by nest::Network::add_node().

void nest::Node::set_lid_ ( index  i)
inlineprivate

Set local id, relative to the parent subnet.

References lid_.

Referenced by nest::Subnet::add_node().

void nest::Node::set_local_receiver ( const bool  )
virtual

Sets local_receiver_ member variable (to switch to global spike detection mode)

Reimplemented in nest::spike_detector.

Referenced by nest::Network::add_node().

void nest::Node::set_model_id ( int  i)
inline

Set the model id.

This method is called by Network::add_node() when a node is created.

See also
get_model_id()

References model_id_.

Referenced by nest::Network::add_node(), nest::Network::copy_model(), nest::Network::init_(), nest::proxynode::proxynode(), and nest::Network::register_model().

void nest::Node::set_parent_ ( Subnet c)
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)
void nest::Node::set_subnet_index_ ( index  i)
inlineprivate

Index into node array in subnet.

References subnet_index_.

Referenced by nest::Subnet::add_node().

void nest::Node::set_thread ( thread  t)
inline

Store the number of the thread to which the node is assigned.

The assignment is done after node creation by the Network class.

See also
: Network::add_node().

References thread_.

Referenced by nest::Network::add_node(), and nest::Network::init_().

void nest::Node::set_thread_lid ( const index  tlid)
inline

set thread local index

References thread_lid_.

Referenced by nest::Scheduler::prepare_nodes().

void nest::Node::set_vp ( thread  vp)
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().

void nest::Node::unregister_stdp_connection ( double_t  )
virtual

Unregister a STDP connection.

Default implementation of unregister_stdp_connection() just throws IllegalConnection.

Exceptions
IllegalConnection

Reimplemented in nest::Archiving_Node.

virtual void nest::Node::update ( Time const &  ,
const long_t  ,
const long_t   
)
pure virtual

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.

Parameters
Timenetwork time at beginning of time slice.
long_tinitial step inside time slice
long_tpost-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.

Friends And Related Function Documentation

friend class Model
friend
friend class Network
friend
friend class proxynode
friend
friend class Scheduler
friend
friend class Subnet
friend
friend class Synapse
friend

Member Data Documentation

bool nest::Node::buffers_initialized_
private

Buffers have been initialized.

Referenced by buffers_initialized(), init_buffers(), and set_buffers_initialized().

bool nest::Node::frozen_
private

node shall not be updated if true

Referenced by is_frozen(), set_frozen_(), and set_status_base().

index nest::Node::gid_
private

Global element id (within network).

Referenced by get_gid(), and set_gid_().

index nest::Node::lid_
private

Local element id (within parent).

Referenced by get_lid(), and set_lid_().

int nest::Node::model_id_
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.

See also
get_model_id(), set_model_id()

Referenced by get_model_(), get_model_id(), get_name(), init_state(), and set_model_id().

Network * nest::Node::net_ =NULL
staticprotected
Subnet* nest::Node::parent_
private

Pointer to parent.

Referenced by get_parent(), get_status_base(), and set_parent_().

index nest::Node::subnet_index_
private

Index of node in parent's node array.

Referenced by get_subnet_index(), and set_subnet_index_().

thread nest::Node::thread_
private

thread node is assigned to

Referenced by get_thread(), and set_thread().

index nest::Node::thread_lid_
private

Local id of this node in the thread-local vector of nodes.

Referenced by get_thread_lid(), and set_thread_lid().

thread nest::Node::vp_
private

virtual process node is assigned to

Referenced by get_vp(), is_model_prototype(), and set_vp().


The documentation for this class was generated from the following files: