NEST  2.6.0,not_revisioned_source_dir@0
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
nest::ConnectionManager Class Reference

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< tSConnectortVSConnector
 

Private Member Functions

void init_ ()
 
void delete_connections_ ()
 
void clear_prototypes_ ()
 
ConnectorBasevalidate_source_entry (thread tid, index s_gid, synindex syn_id)
 
const ConnectorModelget_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...
 
Networknet_
 The reference to the network. More...
 
Dictionarysynapsedict_
 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...
 

Detailed Description

Manages the available connection prototypes and connections.

It provides the interface to establish and modify connections between nodes.

Member Typedef Documentation

typedef google::sparsetable< ConnectorBase* > nest::ConnectionManager::tSConnector
private
typedef std::vector< tSConnector > nest::ConnectionManager::tVSConnector
private

Constructor & Destructor Documentation

nest::ConnectionManager::ConnectionManager ( Network net)
nest::ConnectionManager::~ConnectionManager ( )

Member Function Documentation

void nest::ConnectionManager::assert_valid_syn_id ( synindex  syn_id,
thread  t = 0 
) const
inlineprivate

Asserts validity of synapse index, otherwise throws exception.

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

void nest::ConnectionManager::clear_prototypes_ ( )
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.

Parameters
sA reference to the sending Node.
rA reference to the receiving Node.
tThe thread of the target node.
synThe synapse model to use.
Returns
The receiver port number for the new connection

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

synindex nest::ConnectionManager::copy_synapse_prototype ( synindex  old_id,
std::string  new_name 
)
void nest::ConnectionManager::delete_connections_ ( )
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
void nest::ConnectionManager::get_status ( DictionaryDatum d) const

Add ConnectionManager specific stuff to the root status dictionary.

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

const ConnectorModel & nest::ConnectionManager::get_synapse_prototype ( synindex  syn_id,
thread  t = 0 
) const
inlineprivate

Return pointer to protoype for given synapse id.

Exceptions
UnknownSynapseType

References assert_valid_syn_id(), and prototypes_.

DictionaryDatum nest::ConnectionManager::get_synapse_status ( index  gid,
synindex  syn_id,
port  p,
thread  tid 
)
bool nest::ConnectionManager::get_user_set_delay_extrema ( ) const
bool nest::ConnectionManager::has_user_prototypes ( ) const
inline
void nest::ConnectionManager::init ( Dictionary )

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

void nest::ConnectionManager::init_ ( )
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().

void nest::ConnectionManager::send ( thread  t,
index  sgid,
Event e 
)
void nest::ConnectionManager::set_prototype_status ( synindex  syn_id,
const DictionaryDatum d 
)
void nest::ConnectionManager::set_synapse_status ( index  gid,
synindex  syn_id,
port  p,
thread  tid,
const DictionaryDatum d 
)
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 
)
ConnectorBase* nest::ConnectionManager::validate_source_entry ( thread  tid,
index  s_gid,
synindex  syn_id 
)
private

Member Data Documentation

tVSConnector nest::ConnectionManager::connections_
private

A 3-dim structure to hold the Connector objects which in turn hold the connection information.

  • First dim: A std::vector for each local thread
  • Second dim: A std::vector for each node on each thread
  • Third dim: A std::vector for each synapse prototype, holding the Connector objects
Network& nest::ConnectionManager::net_
private

The reference to the network.

size_t nest::ConnectionManager::num_connections_
mutableprivate

The global counter for the number of synapses.

std::vector<ConnectorModel*> nest::ConnectionManager::pristine_prototypes_
private

The list of clean synapse prototypes.

Referenced by has_user_prototypes().

std::vector< std::vector<ConnectorModel*> > nest::ConnectionManager::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().

Dictionary* nest::ConnectionManager::synapsedict_
private

The synapsedict (owned by the network)


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