NEST
2.6.0,not_revisioned_source_dir@0
|
Base class for all subnet nodes. More...
#include <subnet.h>
Public Member Functions | |
Subnet () | |
Subnet (const Subnet &) | |
virtual | ~Subnet () |
void | set_status (const DictionaryDatum &) |
void | get_status (DictionaryDatum &) const |
bool | has_proxies () const |
Returns true if the node has proxies on remote threads. More... | |
size_t | global_size () const |
Returns total number of children. More... | |
size_t | local_size () const |
Returns number of childern in local process. More... | |
bool | global_empty () const |
returns true if subnet is empty globally More... | |
bool | local_empty () const |
returns true if subnet has no local nodes More... | |
void | reserve (size_t) |
index | add_node (Node *) |
Add a local node to the subnet. More... | |
index | add_remote_node (index gid, index mid) |
Add a remote node to the subnet. More... | |
vector< Node * >::iterator | local_begin () |
Return iterator to the first local child node. More... | |
vector< Node * >::iterator | local_end () |
Return iterator to the end of the local child-list. More... | |
vector< Node * >::const_iterator | local_begin () const |
Return const iterator to the first local child node. More... | |
vector< Node * >::const_iterator | local_end () const |
Return const iterator to the end of the local child-list. More... | |
Node * | at_lid (index) const |
Return pointer to Node at given LID if it is local. More... | |
std::string | get_label () const |
Return the subnets's user label. More... | |
void | set_label (std::string const) |
Set the subnet's user label. More... | |
DictionaryDatum | get_customdict () const |
Set the subnet's custom dictionary. More... | |
void | set_customdict (DictionaryDatum const dict) |
Return pointer to the subnet's custom dictionary. More... | |
std::string | print_network (int, int, std::string="") |
Prints out one line of the tree view of the network. More... | |
bool | is_subnet () const |
bool | is_homogeneous () const |
Public Member Functions inherited from nest::Node | |
Node () | |
Node (Node const &) | |
virtual | ~Node () |
virtual Node * | clone () const |
Virtual copy constructor. 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... | |
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 | 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... | |
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) |
Protected Member Functions | |
void | init_node_ (const Node &) |
void | init_state_ (const Node &) |
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 &, const long_t, const long_t) |
Bring the node from state $t$ to $t+n*dt$. 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... | |
Protected Attributes | |
vector< Node * > | nodes_ |
Pointer to child nodes. More... | |
Multirange | gids_ |
GIDs of global child nodes. More... | |
Private Member Functions | |
void | get_dimensions_ (std::vector< int > &) const |
Private Attributes | |
std::string | label_ |
user-defined label for this node. More... | |
DictionaryDatum | customdict_ |
user-defined dictionary for this node. More... | |
bool | homogeneous_ |
flag which indicates if the subnet contains different kinds of models. More... | |
index | last_mid_ |
model index of last child More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from nest::Node | |
static Network * | network () |
Return pointer to network driver class. More... | |
Static Protected Attributes inherited from nest::Node | |
static Network * | net_ =NULL |
Pointer to global network driver. More... | |
Base class for all subnet nodes.
This class can be used
nest::Subnet::Subnet | ( | ) |
References nest::Node::set_frozen_().
nest::Subnet::Subnet | ( | const Subnet & | c | ) |
|
inlinevirtual |
Add a local node to the subnet.
This function adds a node to the subnet and returns its local id. The node is appended to the subnet child-list.
References nest::Node::get_gid(), nest::Node::get_model_id(), gids_, homogeneous_, last_mid_, nest::names::lid, nodes_, nest::Multirange::push_back(), nest::Node::set_lid_(), nest::Node::set_parent_(), nest::Node::set_subnet_index_(), and nest::Multirange::size().
Referenced by nest::Network::add_node().
Add a remote node to the subnet.
This function increments the next local id to be assigned.
References gids_, homogeneous_, last_mid_, nest::names::lid, nest::Multirange::push_back(), and nest::Multirange::size().
Referenced by nest::Network::add_node().
Return pointer to Node at given LID if it is local.
References assert(), global_size(), nest::names::lid, local_size(), and nodes_.
|
inlineprotectedvirtual |
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.
|
inline |
Set the subnet's custom dictionary.
Each subnet can be given a user-defined dictionary, which may be used to store additional data. From the SLI level, the SetStatus command may be used to set a subnet's custom dictionary.
References customdict_.
|
private |
References nest::names::c, get_dimensions_(), and global_size().
Referenced by get_dimensions_().
|
inline |
Return the subnets's user label.
Each subnet can be given a user-defined string as a label, which may be used to give a symbolic name to the node. From the SLI level, the GetGlobalNodes command may be used to find a subnet's GID from its label.
References label_.
void nest::Subnet::get_status | ( | DictionaryDatum & | dict | ) | const |
References nest::names::element_type, and nest::names::structure.
Referenced by nest::Layer< D >::get_status().
|
inline |
returns true if subnet is empty globally
References nest::Multirange::empty(), and gids_.
|
inline |
Returns total number of children.
References gids_, and nest::Multirange::size().
Referenced by at_lid(), get_dimensions_(), nest::AbstractLayer::local_begin(), nest::AbstractLayer::local_end(), and nest::GridLayer< D >::masked_iterator::masked_iterator().
|
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 from nest::Node.
|
inlineprotectedvirtual |
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.
|
inlineprotected |
|
inlineprotectedvirtual |
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.
|
inline |
References homogeneous_.
Referenced by nest::ConnectionGeneratorModule::CGConnect_cg_i_i_D_lFunction::execute().
|
virtual |
|
inline |
Return iterator to the first local child node.
References nodes_.
Referenced by nest::LocalNodeListBase< ListIterator >::begin(), nest::ConnectionGeneratorModule::CGConnect_cg_i_i_D_lFunction::execute(), nest::AbstractLayer::local_begin(), nest::AbstractLayer::local_end(), and nest::LocalNodeListIterator::operator++().
|
inline |
Return const iterator to the first local child node.
References nodes_.
|
inline |
returns true if subnet has no local nodes
References nodes_.
Referenced by nest::LocalNodeListBase< ListIterator >::begin(), nest::LocalNodeListBase< ListIterator >::empty(), and nest::LocalNodeListIterator::operator++().
|
inline |
Return iterator to the end of the local child-list.
References nodes_.
Referenced by nest::LocalNodeListBase< ListIterator >::end(), nest::AbstractLayer::local_begin(), nest::AbstractLayer::local_end(), and nest::LocalNodeListIterator::operator++().
|
inline |
Return const iterator to the end of the local child-list.
References nodes_.
|
inline |
Returns number of childern in local process.
References nodes_.
Referenced by at_lid(), nest::AbstractLayer::local_begin(), and nest::AbstractLayer::local_end().
|
virtual |
Prints out one line of the tree view of the network.
Reimplemented from nest::Node.
References nest::names::c, nest::Node::get_name(), and print_network().
Referenced by nest::Network::print(), and print_network().
|
inline |
References nodes_.
|
inline |
Return pointer to the subnet's custom dictionary.
Each subnet contains a user-definable dictionary, which may be used to store additional data. From the SLI level, the SetStatus command may be used to set a subnet's custom dictionary.
References customdict_, and nest::names::d.
void nest::Subnet::set_label | ( | std::string const | l | ) |
Set the subnet's user label.
Each subnet can be given a user-defined string as a label, which may be used to give a symbolic name to the node. From the SLI level, the GetGlobalNodes command may be used to find a subnet's GID from its label.
References assert(), nest::names::c, label_, and nest::names::n.
void nest::Subnet::set_status | ( | const DictionaryDatum & | dict | ) |
Referenced by nest::AbstractLayer::create_layer(), and nest::Layer< D >::set_status().
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 |
Implements nest::Node.
|
private |
user-defined dictionary for this node.
Referenced by get_customdict(), and set_customdict().
|
protected |
GIDs of global child nodes.
This Multirange contains the GIDs of all child nodes on all processes.
Referenced by add_node(), add_remote_node(), global_empty(), global_size(), nest::AbstractLayer::local_begin(), and nest::AbstractLayer::local_end().
|
private |
flag which indicates if the subnet contains different kinds of models.
Referenced by add_node(), add_remote_node(), and is_homogeneous().
|
private |
user-defined label for this node.
Referenced by get_label(), and set_label().
|
private |
model index of last child
Referenced by add_node(), and add_remote_node().
|
protected |
Pointer to child nodes.
This vector contains the pointers to the child nodes. Since deletion of Nodes is possible, entries in this vector may be NULL. Note that all code must handle this case gracefully.
Referenced by add_node(), at_lid(), local_begin(), local_empty(), local_end(), local_size(), and reserve().