NEST
2.6.0,not_revisioned_source_dir@0
|
Manages the available connection prototypes and connections. More...
#include <connection_manager.h>
Public Member Functions | |
ConnectionManager (Network &net) | |
~ConnectionManager () | |
void | init (Dictionary *) |
void | reset () |
synindex | register_synapse_prototype (ConnectorModel *cf) |
Register a synapse type. More... | |
bool | synapse_prototype_in_use (synindex syn_id) |
Checks, whether connections of the given type were created. More... | |
void | get_status (DictionaryDatum &d) const |
Add ConnectionManager specific stuff to the root status dictionary. More... | |
void | set_prototype_status (synindex syn_id, const DictionaryDatum &d) |
DictionaryDatum | get_prototype_status (synindex syn_id) const |
DictionaryDatum | get_synapse_status (index gid, synindex syn_id, port p, thread tid) |
void | set_synapse_status (index gid, synindex syn_id, port p, thread tid, const DictionaryDatum &d) |
ArrayDatum | get_connections (DictionaryDatum params) const |
Return connections between pairs of neurons. More... | |
void | get_connections (ArrayDatum &connectome, TokenArray const *source, TokenArray const *target, size_t syn_id) const |
synindex | copy_synapse_prototype (synindex old_id, std::string new_name) |
bool | has_user_prototypes () const |
bool | get_user_set_delay_extrema () const |
const Time | get_min_delay () const |
const Time | get_max_delay () const |
size_t | get_num_connections () const |
Make sure that the connection counters are up-to-date and return the total number of connections in the network. More... | |
void | connect (Node &s, Node &r, index s_gid, thread tid, index syn, double_t d=NAN, double_t w=NAN) |
Connect is used to establish a connection between a sender and receiving node. More... | |
void | connect (Node &s, Node &r, index s_gid, thread tid, index syn, DictionaryDatum &p, double_t d=NAN, double_t w=NAN) |
bool | connect (ArrayDatum &d) |
Experimental bulk connector. More... | |
void | trigger_update_weight (const long_t vt_gid, const vector< spikecounter > &dopa_spikes, const double_t t_trig) |
void | send (thread t, index sgid, Event &e) |
void | calibrate (const TimeConverter &) |
Resize the structures for the Connector objects if necessary. More... | |
Private Types | |
typedef google::sparsetable < ConnectorBase * > | tSConnector |
typedef std::vector< tSConnector > | tVSConnector |
Private Member Functions | |
void | init_ () |
void | delete_connections_ () |
void | clear_prototypes_ () |
ConnectorBase * | validate_source_entry (thread tid, index s_gid, synindex syn_id) |
const ConnectorModel & | get_synapse_prototype (synindex syn_id, thread t=0) const |
Return pointer to protoype for given synapse id. More... | |
void | assert_valid_syn_id (synindex syn_id, thread t=0) const |
Asserts validity of synapse index, otherwise throws exception. More... | |
Private Attributes | |
std::vector< ConnectorModel * > | pristine_prototypes_ |
The list of clean synapse prototypes. More... | |
std::vector< std::vector < ConnectorModel * > > | prototypes_ |
The list of available synapse prototypes: first dimenasion one entry per thread, second dimantion for each synapse type. More... | |
Network & | net_ |
The reference to the network. More... | |
Dictionary * | synapsedict_ |
The synapsedict (owned by the network) More... | |
tVSConnector | connections_ |
A 3-dim structure to hold the Connector objects which in turn hold the connection information. More... | |
size_t | num_connections_ |
The global counter for the number of synapses. More... | |
Manages the available connection prototypes and connections.
It provides the interface to establish and modify connections between nodes.
|
private |
|
private |
nest::ConnectionManager::ConnectionManager | ( | Network & | net | ) |
nest::ConnectionManager::~ConnectionManager | ( | ) |
|
inlineprivate |
Asserts validity of synapse index, otherwise throws exception.
UnknownSynapseType |
References prototypes_.
Referenced by get_synapse_prototype().
void nest::ConnectionManager::calibrate | ( | const TimeConverter & | ) |
Resize the structures for the Connector objects if necessary.
This function should be called after number of threads, min_delay, max_delay, and time representation have been changed in the scheduler. The TimeConverter is used to convert times from the old to the new representation. It is also forwarding the calibration request to all ConnectorModel objects.
|
private |
void nest::ConnectionManager::connect | ( | Node & | s, |
Node & | r, | ||
index | s_gid, | ||
thread | tid, | ||
index | syn, | ||
double_t | d = NAN , |
||
double_t | w = NAN |
||
) |
Connect is used to establish a connection between a sender and receiving node.
The parameters delay and weight have the default value NAN. NAN is a special value in cmath, which describes double values that are not a number. If delay or weight is omitted in an connect call, NAN indicates this and weight/delay are set only, if they are valid.
s | A reference to the sending Node. |
r | A reference to the receiving Node. |
t | The thread of the target node. |
syn | The synapse model to use. |
Referenced by nest::Network::connect(), nest::Network::convergent_connect(), and nest::Network::divergent_connect().
void nest::ConnectionManager::connect | ( | Node & | s, |
Node & | r, | ||
index | s_gid, | ||
thread | tid, | ||
index | syn, | ||
DictionaryDatum & | p, | ||
double_t | d = NAN , |
||
double_t | w = NAN |
||
) |
bool nest::ConnectionManager::connect | ( | ArrayDatum & | d | ) |
Experimental bulk connector.
See documentation in network.h
Referenced by nest::Network::copy_synapse_prototype().
|
private |
ArrayDatum nest::ConnectionManager::get_connections | ( | DictionaryDatum | params | ) | const |
Return connections between pairs of neurons.
The params dictionary can have the following entries: 'source' a token array with GIDs of source neurons. 'target' a token array with GIDs of target neuron. If either of these does not exist, all neuron are used for the respective entry. 'synapse_model' name of the synapse model, or all synapse models are searched. The function then iterates all entries in source and collects the connection IDs to all neurons in target.
Referenced by nest::Network::get_connections().
void nest::ConnectionManager::get_connections | ( | ArrayDatum & | connectome, |
TokenArray const * | source, | ||
TokenArray const * | target, | ||
size_t | syn_id | ||
) | const |
const Time nest::ConnectionManager::get_max_delay | ( | ) | const |
const Time nest::ConnectionManager::get_min_delay | ( | ) | const |
size_t nest::ConnectionManager::get_num_connections | ( | ) | const |
Make sure that the connection counters are up-to-date and return the total number of connections in the network.
DictionaryDatum nest::ConnectionManager::get_prototype_status | ( | synindex | syn_id | ) | const |
Referenced by nest::Network::get_connector_defaults().
void nest::ConnectionManager::get_status | ( | DictionaryDatum & | d | ) | const |
Add ConnectionManager specific stuff to the root status dictionary.
Referenced by nest::Network::get_status().
|
inlineprivate |
Return pointer to protoype for given synapse id.
UnknownSynapseType |
References assert_valid_syn_id(), and prototypes_.
DictionaryDatum nest::ConnectionManager::get_synapse_status | ( | index | gid, |
synindex | syn_id, | ||
port | p, | ||
thread | tid | ||
) |
Referenced by nest::Network::get_synapse_status().
bool nest::ConnectionManager::get_user_set_delay_extrema | ( | ) | const |
|
inline |
References pristine_prototypes_, and prototypes_.
void nest::ConnectionManager::init | ( | Dictionary * | ) |
Referenced by nest::Network::Network().
|
private |
synindex nest::ConnectionManager::register_synapse_prototype | ( | ConnectorModel * | cf | ) |
Register a synapse type.
This is called by Network::register_synapse_prototype. Returns an id, which is needed to unregister the prototype later.
Referenced by nest::Network::register_synapse_prototype().
void nest::ConnectionManager::reset | ( | ) |
Referenced by nest::Network::reset().
Referenced by nest::Network::send(), and nest::Network::send_local().
void nest::ConnectionManager::set_prototype_status | ( | synindex | syn_id, |
const DictionaryDatum & | d | ||
) |
Referenced by nest::Network::set_connector_defaults().
void nest::ConnectionManager::set_synapse_status | ( | index | gid, |
synindex | syn_id, | ||
port | p, | ||
thread | tid, | ||
const DictionaryDatum & | d | ||
) |
Referenced by nest::Network::set_synapse_status().
bool nest::ConnectionManager::synapse_prototype_in_use | ( | synindex | syn_id | ) |
Checks, whether connections of the given type were created.
void nest::ConnectionManager::trigger_update_weight | ( | const long_t | vt_gid, |
const vector< spikecounter > & | dopa_spikes, | ||
const double_t | t_trig | ||
) |
Referenced by nest::Network::trigger_update_weight().
|
private |
|
private |
|
private |
The reference to the network.
|
mutableprivate |
The global counter for the number of synapses.
|
private |
The list of clean synapse prototypes.
Referenced by has_user_prototypes().
|
private |
The list of available synapse prototypes: first dimenasion one entry per thread, second dimantion for each synapse type.
Referenced by assert_valid_syn_id(), get_synapse_prototype(), and has_user_prototypes().
|
private |
The synapsedict (owned by the network)