NEST main@caf0ae8
 
Loading...
Searching...
No Matches
nest::ConnectorBase Class Referenceabstract

Base class to allow storing Connectors for different synapse types in vectors. More...

#include <connector_base.h>

Inheritance diagram for nest::ConnectorBase:
[legend]

Public Member Functions

virtual ~ConnectorBase ()
 
virtual synindex get_syn_id () const =0
 Return syn_id_ of the synapse type of this Connector (size_t in list of synapse prototypes).
 
virtual size_t size () const =0
 Return the number of connections in this Connector.
 
virtual void get_synapse_status (const size_t tid, const size_t lcid, Dictionary &dict) const =0
 Write status of the connection at position lcid to the dictionary dict.
 
virtual void set_synapse_status (const size_t tid, const Dictionary &dict, ConnectorModel &cm)=0
 Set status of the connection at position lcid according to the dictionary dict.
 
virtual void get_connection (const size_t source_node_id, const size_t target_node_id, const size_t tid, const size_t lcid, const long synapse_label, std::deque< ConnectionID > &conns) const =0
 Add ConnectionID with given source_node_id and lcid to conns.
 
virtual void get_connection_with_specified_targets (const size_t source_node_id, const std::vector< size_t > &target_neuron_node_ids, const size_t tid, const size_t lcid, const long synapse_label, std::deque< ConnectionID > &conns) const =0
 Add ConnectionID with given source_node_id and lcid to conns.
 
virtual void get_all_connections (const size_t source_node_id, const size_t target_node_id, const size_t tid, const long synapse_label, std::deque< ConnectionID > &conns) const =0
 Add ConnectionIDs with given source_node_id to conns, looping over all lcids.
 
virtual void get_source_lcids (const size_t tid, const size_t target_node_id, std::vector< size_t > &source_lcids) const =0
 For a given target_node_id add lcids of all connections with matching node ID of target to source_lcids.
 
virtual void get_target_node_ids (const size_t tid, const size_t start_lcid, const std::string &post_synaptic_element, std::vector< size_t > &target_node_ids) const =0
 For a given start_lcid add node IDs of all targets that belong to the same source to target_node_ids.
 
virtual size_t get_target_node_id (const size_t tid, const unsigned int lcid) const =0
 For a given lcid return the node ID of the target of the connection.
 
virtual void send_to_all (const size_t tid, const std::vector< ConnectorModel * > &cm, Event &e)=0
 Send the event e to all connections of this Connector.
 
virtual size_t send (const size_t tid, const size_t lcid, const std::vector< ConnectorModel * > &cm, Event &e)=0
 Send the event e to the connection at position lcid.
 
virtual void send_weight_event (const size_t tid, const unsigned int lcid, Event &e, const CommonSynapseProperties &cp)=0
 
virtual void trigger_update_weight (const long vt_node_id, const size_t tid, const std::vector< spikecounter > &dopa_spikes, const double t_trig, const std::vector< ConnectorModel * > &cm)=0
 Update weights of dopamine modulated STDP connections.
 
virtual void sort_connections (BlockVector< Source > &)=0
 Sort connections according to source node IDs.
 
virtual void set_source_has_more_targets (const size_t lcid, const bool has_more_targets)=0
 Set a flag in the connection indicating whether the following connection belongs to the same source.
 
virtual size_t find_first_target (const size_t tid, const size_t start_lcid, const size_t target_node_id) const =0
 Return lcid of the first connection after start_lcid (inclusive) where the node_id of the target matches target_node_id.
 
virtual size_t find_enabled_connection (const size_t tid, const size_t syn_id, const size_t source_node_id, const size_t target_node_id, const SourceTable &source_table) const =0
 Return lcid of first connection matching source and target node id and that is not disabled.
 
virtual void disable_connection (const size_t lcid)=0
 Disable the transfer of events through the connection at position lcid.
 
virtual void remove_disabled_connections (const size_t first_disabled_index)=0
 Remove disabled connections from the connector.
 

Detailed Description

Base class to allow storing Connectors for different synapse types in vectors.

We define the interface here to avoid casting.

Note
If any member functions need to do something special for a given connection type, declare specializations in the corresponding header file and define them in the corresponding source file. For an example, see eprop_synapse_bsshslm_2020.

Constructor & Destructor Documentation

◆ ~ConnectorBase()

virtual nest::ConnectorBase::~ConnectorBase ( )
inlinevirtual

Member Function Documentation

◆ disable_connection()

virtual void nest::ConnectorBase::disable_connection ( const size_t  lcid)
pure virtual

◆ find_enabled_connection()

virtual size_t nest::ConnectorBase::find_enabled_connection ( const size_t  tid,
const size_t  syn_id,
const size_t  source_node_id,
const size_t  target_node_id,
const SourceTable &  source_table 
) const
pure virtual

Return lcid of first connection matching source and target node id and that is not disabled.

Intended for use with unsorted (uncompressed) connections.

Implemented in nest::Connector< ConnectionT >.

◆ find_first_target()

virtual size_t nest::ConnectorBase::find_first_target ( const size_t  tid,
const size_t  start_lcid,
const size_t  target_node_id 
) const
pure virtual

Return lcid of the first connection after start_lcid (inclusive) where the node_id of the target matches target_node_id.

If there are no matches, the function returns invalid_index.

Implemented in nest::Connector< ConnectionT >.

◆ get_all_connections()

virtual void nest::ConnectorBase::get_all_connections ( const size_t  source_node_id,
const size_t  target_node_id,
const size_t  tid,
const long  synapse_label,
std::deque< ConnectionID > &  conns 
) const
pure virtual

Add ConnectionIDs with given source_node_id to conns, looping over all lcids.

If target_node_id is given, only add connection if target_node_id matches the node ID of the target of the connection.

Implemented in nest::Connector< ConnectionT >.

◆ get_connection()

virtual void nest::ConnectorBase::get_connection ( const size_t  source_node_id,
const size_t  target_node_id,
const size_t  tid,
const size_t  lcid,
const long  synapse_label,
std::deque< ConnectionID > &  conns 
) const
pure virtual

Add ConnectionID with given source_node_id and lcid to conns.

If target_node_id is given, only add connection if target_node_id matches the node_id of the target of the connection.

Implemented in nest::Connector< ConnectionT >.

Referenced by nest::ConnectionManager::get_connections_(), and nest::ConnectionManager::get_connections_from_sources_().

Here is the caller graph for this function:

◆ get_connection_with_specified_targets()

virtual void nest::ConnectorBase::get_connection_with_specified_targets ( const size_t  source_node_id,
const std::vector< size_t > &  target_neuron_node_ids,
const size_t  tid,
const size_t  lcid,
const long  synapse_label,
std::deque< ConnectionID > &  conns 
) const
pure virtual

Add ConnectionID with given source_node_id and lcid to conns.

If target_neuron_node_ids is given, only add connection if target_neuron_node_ids contains the node ID of the target of the connection.

Implemented in nest::Connector< ConnectionT >.

Referenced by nest::ConnectionManager::get_connections_from_sources_(), and nest::ConnectionManager::get_connections_to_targets_().

Here is the caller graph for this function:

◆ get_source_lcids()

virtual void nest::ConnectorBase::get_source_lcids ( const size_t  tid,
const size_t  target_node_id,
std::vector< size_t > &  source_lcids 
) const
pure virtual

For a given target_node_id add lcids of all connections with matching node ID of target to source_lcids.

Implemented in nest::Connector< ConnectionT >.

◆ get_syn_id()

virtual synindex nest::ConnectorBase::get_syn_id ( ) const
pure virtual

Return syn_id_ of the synapse type of this Connector (size_t in list of synapse prototypes).

Implemented in nest::Connector< ConnectionT >.

◆ get_synapse_status()

virtual void nest::ConnectorBase::get_synapse_status ( const size_t  tid,
const size_t  lcid,
Dictionary &  dict 
) const
pure virtual

Write status of the connection at position lcid to the dictionary dict.

Implemented in nest::Connector< ConnectionT >.

◆ get_target_node_id()

virtual size_t nest::ConnectorBase::get_target_node_id ( const size_t  tid,
const unsigned int  lcid 
) const
pure virtual

For a given lcid return the node ID of the target of the connection.

Implemented in nest::Connector< ConnectionT >.

◆ get_target_node_ids()

virtual void nest::ConnectorBase::get_target_node_ids ( const size_t  tid,
const size_t  start_lcid,
const std::string &  post_synaptic_element,
std::vector< size_t > &  target_node_ids 
) const
pure virtual

For a given start_lcid add node IDs of all targets that belong to the same source to target_node_ids.

Implemented in nest::Connector< ConnectionT >.

◆ remove_disabled_connections()

virtual void nest::ConnectorBase::remove_disabled_connections ( const size_t  first_disabled_index)
pure virtual

Remove disabled connections from the connector.

Implemented in nest::Connector< ConnectionT >.

◆ send()

virtual size_t nest::ConnectorBase::send ( const size_t  tid,
const size_t  lcid,
const std::vector< ConnectorModel * > &  cm,
Event &  e 
)
pure virtual

Send the event e to the connection at position lcid.

Return bool indicating whether the following connection belongs to the same source.

Implemented in nest::Connector< ConnectionT >.

◆ send_to_all()

virtual void nest::ConnectorBase::send_to_all ( const size_t  tid,
const std::vector< ConnectorModel * > &  cm,
Event &  e 
)
pure virtual

Send the event e to all connections of this Connector.

Implemented in nest::Connector< ConnectionT >.

◆ send_weight_event()

virtual void nest::ConnectorBase::send_weight_event ( const size_t  tid,
const unsigned int  lcid,
Event &  e,
const CommonSynapseProperties &  cp 
)
pure virtual

◆ set_source_has_more_targets()

virtual void nest::ConnectorBase::set_source_has_more_targets ( const size_t  lcid,
const bool  has_more_targets 
)
pure virtual

Set a flag in the connection indicating whether the following connection belongs to the same source.

Implemented in nest::Connector< ConnectionT >.

◆ set_synapse_status()

virtual void nest::ConnectorBase::set_synapse_status ( const size_t  tid,
const Dictionary &  dict,
ConnectorModel &  cm 
)
pure virtual

Set status of the connection at position lcid according to the dictionary dict.

Implemented in nest::Connector< ConnectionT >.

◆ size()

virtual size_t nest::ConnectorBase::size ( ) const
pure virtual

Return the number of connections in this Connector.

Implemented in nest::Connector< ConnectionT >.

Referenced by nest::ConnectionManager::get_connections_(), nest::ConnectionManager::get_connections_from_sources_(), and nest::ConnectionManager::get_connections_to_targets_().

Here is the caller graph for this function:

◆ sort_connections()

virtual void nest::ConnectorBase::sort_connections ( BlockVector< Source > &  )
pure virtual

Sort connections according to source node IDs.

Implemented in nest::Connector< ConnectionT >.

◆ trigger_update_weight()

virtual void nest::ConnectorBase::trigger_update_weight ( const long  vt_node_id,
const size_t  tid,
const std::vector< spikecounter > &  dopa_spikes,
const double  t_trig,
const std::vector< ConnectorModel * > &  cm 
)
pure virtual

Update weights of dopamine modulated STDP connections.

Implemented in nest::Connector< ConnectionT >.


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