NEST main@f146f75
Loading...
Searching...
No Matches
nest::Connector< ConnectionT > Class Template Reference

Homogeneous connector, contains synapses of one particular type (syn_id_). More...

#include <connector_base.h>

Inheritance diagram for nest::Connector< ConnectionT >:
[legend]
Collaboration diagram for nest::Connector< ConnectionT >:
[legend]

Public Member Functions

 Connector (const synindex syn_id)
 ~Connector () override
synindex get_syn_id () const override
 Return syn_id_ of the synapse type of this Connector (size_t in list of synapse prototypes).
size_t size () const override
 Return the number of connections in this Connector.
void get_synapse_status (const size_t tid, const size_t lcid, Dictionary &dict) const override
 Write status of the connection at position lcid to the dictionary dict.
void set_synapse_status (const size_t lcid, const Dictionary &dict, ConnectorModel &cm) override
 Set status of the connection at position lcid according to the dictionary dict.
void push_back (const ConnectionT &c)
void push_back (ConnectionT &&c)
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 override
 Add ConnectionID with given source_node_id and lcid to conns.
void get_connection_with_specified_targets (const size_t source_node_id, const NodeCollectionPTR &target, const size_t tid, const size_t lcid, const long synapse_label, std::deque< ConnectionID > &conns) const override
 Add Connections with given source_node_id and lcid to conns.
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 override
 Add ConnectionIDs with given source_node_id to conns, looping over all lcids.
void get_source_lcids (const size_t tid, const size_t target_node_id, std::vector< size_t > &source_lcids) const override
 For a given target_node_id add lcids of all connections with matching node ID of target to source_lcids.
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 override
 For a given start_lcid add node IDs of all targets that belong to the same source to target_node_ids.
size_t get_target_node_id (const size_t tid, const unsigned int lcid) const override
 For a given lcid return the node ID of the target of the connection.
void send_to_all (const size_t tid, const std::vector< ConnectorModel * > &cm, Event &e) override
 Send the event e to all connections of this Connector.
size_t send (const size_t tid, const size_t lcid, const std::vector< ConnectorModel * > &cm, Event &e) override
 Send the event e to the connection at position lcid.
void correct_weight_stdp_ax_delay (const size_t tid, CorrectionEntrySTDPAxDelay &entry, const double t_spike_critical_interval_end, const double t_post_spike) override
 On occurrence of a post-synaptic spike, correct the weight update of a previous pre-synaptic spike which was processed before the current post-synaptic spike, but had to be processed after it, if it was known at this point in time.
void send_weight_event (const size_t tid, const unsigned int lcid, Event &e, const CommonSynapseProperties &cp) override
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) override
 Update weights of dopamine modulated STDP connections.
void sort_connections (BlockVector< Source > &sources) override
 Sort connections according to source node IDs.
void set_source_has_more_targets (const size_t lcid, const bool has_more_targets) override
 Set a flag in the connection indicating whether the following connection belongs to the same source.
size_t find_first_target (const size_t tid, const size_t start_lcid, const size_t target_node_id) const override
 Return lcid of the first connection after start_lcid (inclusive) where the node_id of the target matches target_node_id.
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 override
 Return lcid of first connection matching source and target node id and that is not disabled.
void disable_connection (const size_t lcid) override
 Disable the transfer of events through the connection at position lcid.
void remove_disabled_connections (const size_t first_disabled_index) override
 Remove disabled connections from the connector.
void disable_connection (const size_t lcid)
 Disable the transfer of events through the connection at position lcid.
void disable_connection (const size_t lcid)
 Disable the transfer of events through the connection at position lcid.
 ~Connector ()
 ~Connector ()
void disable_connection (const size_t lcid)
 Disable the transfer of events through the connection at position lcid.
void disable_connection (const size_t lcid)
 Disable the transfer of events through the connection at position lcid.
 ~Connector ()
 ~Connector ()
void disable_connection (const size_t lcid)
 Disable the transfer of events through the connection at position lcid.
void disable_connection (const size_t lcid)
 Disable the transfer of events through the connection at position lcid.
 ~Connector ()
 ~Connector ()
void disable_connection (const size_t lcid)
 Disable the transfer of events through the connection at position lcid.
void disable_connection (const size_t lcid)
 Disable the transfer of events through the connection at position lcid.
 ~Connector ()
 ~Connector ()
Public Member Functions inherited from nest::ConnectorBase
virtual ~ConnectorBase ()

Private Member Functions

void register_axonal_delay_correction_required_ (const ConnectionT &c)
 Fold a newly added or modified connection into axonal_delay_correction_required_ and the kernel-wide predominant axonal delay flag.

Private Attributes

BlockVector< ConnectionT > C_
const synindex syn_id_
bool axonal_delay_correction_required_
 Whether any connection held here can ever require a retrospective correction.

Detailed Description

template<typename ConnectionT>
class nest::Connector< ConnectionT >

Homogeneous connector, contains synapses of one particular type (syn_id_).

Constructor & Destructor Documentation

◆ Connector()

template<typename ConnectionT>
nest::Connector< ConnectionT >::Connector ( const synindex syn_id)
inlineexplicit

References axonal_delay_correction_required_, and syn_id_.

Referenced by disable_connection(), and ~Connector().

Here is the caller graph for this function:

◆ ~Connector() [1/9]

template<typename ConnectionT>
nest::Connector< ConnectionT >::~Connector ( )
inlineoverride

References C_.

Referenced by ~Connector().

Here is the caller graph for this function:

◆ ~Connector() [2/9]

References C_, Connector(), and ~Connector().

Here is the call graph for this function:

◆ ~Connector() [3/9]

References C_, Connector(), and ~Connector().

Here is the call graph for this function:

◆ ~Connector() [4/9]

References Connector(), and ~Connector().

Here is the call graph for this function:

◆ ~Connector() [5/9]

References Connector(), and ~Connector().

Here is the call graph for this function:

◆ ~Connector() [6/9]

References C_, Connector(), and ~Connector().

Here is the call graph for this function:

◆ ~Connector() [7/9]

References C_, Connector(), and ~Connector().

Here is the call graph for this function:

◆ ~Connector() [8/9]

References Connector(), and ~Connector().

Here is the call graph for this function:

◆ ~Connector() [9/9]

References Connector(), and ~Connector().

Here is the call graph for this function:

Member Function Documentation

◆ correct_weight_stdp_ax_delay()

template<typename ConnectionT>
void nest::Connector< ConnectionT >::correct_weight_stdp_ax_delay ( const size_t tid,
CorrectionEntrySTDPAxDelay & entry,
const double t_spike_critical_interval_end,
const double t_post_spike )
overridevirtual

On occurrence of a post-synaptic spike, correct the weight update of a previous pre-synaptic spike which was processed before the current post-synaptic spike, but had to be processed after it, if it was known at this point in time.

The new weight of the synapse is recorded in the correction entry.

Parameters
tidThe thread storing the synapse.
entryCorrection entry of the pre-synaptic spike which needs a correction. It identifies the synapse (synapse type and local connection index) and holds the data required for the correction.
t_spike_critical_interval_endEnd of the critical interval of the pre-synaptic spike which needs a correction.
t_post_spikeTime of the current post-synaptic spike.

Implements nest::ConnectorBase.

References C_, nest::ModelManager::get_connection_models(), nest::CorrectionEntrySTDPAxDelay::get_lcid(), nest::CorrectionEntrySTDPAxDelay::get_syn_id(), nest::kernel(), and nest::KernelManager::model_manager.

Here is the call graph for this function:

◆ disable_connection() [1/9]

void nest::Connector< eprop_synapse< TargetIdentifierIndex > >::disable_connection ( const size_t lcid)
virtual

Disable the transfer of events through the connection at position lcid.

Implements nest::ConnectorBase.

References C_, Connector(), and disable_connection().

Here is the call graph for this function:

◆ disable_connection() [2/9]

void nest::Connector< eprop_synapse< TargetIdentifierPtrRport > >::disable_connection ( const size_t lcid)
virtual

Disable the transfer of events through the connection at position lcid.

Implements nest::ConnectorBase.

References C_, Connector(), and disable_connection().

Here is the call graph for this function:

◆ disable_connection() [3/9]

void nest::Connector< eprop_synapse< TargetIdentifierIndex > >::disable_connection ( const size_t lcid)
virtual

Disable the transfer of events through the connection at position lcid.

Implements nest::ConnectorBase.

References Connector(), and disable_connection().

Here is the call graph for this function:

◆ disable_connection() [4/9]

void nest::Connector< eprop_synapse< TargetIdentifierPtrRport > >::disable_connection ( const size_t lcid)
virtual

Disable the transfer of events through the connection at position lcid.

Implements nest::ConnectorBase.

References Connector(), and disable_connection().

Here is the call graph for this function:

◆ disable_connection() [5/9]

void nest::Connector< eprop_synapse_bsshslm_2020< TargetIdentifierIndex > >::disable_connection ( const size_t lcid)
virtual

Disable the transfer of events through the connection at position lcid.

Implements nest::ConnectorBase.

References C_, Connector(), and disable_connection().

Here is the call graph for this function:

◆ disable_connection() [6/9]

void nest::Connector< eprop_synapse_bsshslm_2020< TargetIdentifierPtrRport > >::disable_connection ( const size_t lcid)
virtual

Disable the transfer of events through the connection at position lcid.

Implements nest::ConnectorBase.

References C_, Connector(), and disable_connection().

Here is the call graph for this function:

◆ disable_connection() [7/9]

void nest::Connector< eprop_synapse_bsshslm_2020< TargetIdentifierIndex > >::disable_connection ( const size_t lcid)
virtual

Disable the transfer of events through the connection at position lcid.

Implements nest::ConnectorBase.

References Connector(), and disable_connection().

Here is the call graph for this function:

◆ disable_connection() [8/9]

void nest::Connector< eprop_synapse_bsshslm_2020< TargetIdentifierPtrRport > >::disable_connection ( const size_t lcid)
virtual

Disable the transfer of events through the connection at position lcid.

Implements nest::ConnectorBase.

References Connector(), and disable_connection().

Here is the call graph for this function:

◆ disable_connection() [9/9]

template<typename ConnectionT>
void nest::Connector< ConnectionT >::disable_connection ( const size_t lcid)
inlineoverridevirtual

Disable the transfer of events through the connection at position lcid.

Implements nest::ConnectorBase.

References C_.

Referenced by disable_connection().

Here is the caller graph for this function:

◆ find_enabled_connection()

template<typename ConnectionT>
size_t nest::Connector< ConnectionT >::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
inlineoverridevirtual

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

Intended for use with unsorted (uncompressed) connections.

Implements nest::ConnectorBase.

References C_, and nest::SourceTable::get_node_id().

Here is the call graph for this function:

◆ find_first_target()

template<typename ConnectionT>
size_t nest::Connector< ConnectionT >::find_first_target ( const size_t tid,
const size_t start_lcid,
const size_t target_node_id ) const
inlineoverridevirtual

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.

Implements nest::ConnectorBase.

References C_.

◆ get_all_connections()

template<typename ConnectionT>
void nest::Connector< ConnectionT >::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
inlineoverridevirtual

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.

Implements nest::ConnectorBase.

References C_, and get_connection().

Here is the call graph for this function:

◆ get_connection()

template<typename ConnectionT>
void nest::Connector< ConnectionT >::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
inlineoverridevirtual

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.

Implements nest::ConnectorBase.

References C_, syn_id_, and nest::UNLABELED_CONNECTION.

Referenced by get_all_connections().

Here is the caller graph for this function:

◆ get_connection_with_specified_targets()

template<typename ConnectionT>
void nest::Connector< ConnectionT >::get_connection_with_specified_targets ( const size_t source_node_id,
const NodeCollectionPTR & target,
const size_t tid,
const size_t lcid,
const long synapse_label,
std::deque< ConnectionID > & conns ) const
inlineoverridevirtual

Add Connections with given source_node_id and lcid to conns.

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

Note
target must be passed as const& to NodeCollectionPTR, because otherwise reference counting on the shared_ptr in a thread-parallel context will lead to significant thread contention.

Implements nest::ConnectorBase.

References C_, syn_id_, and nest::UNLABELED_CONNECTION.

◆ get_source_lcids()

template<typename ConnectionT>
void nest::Connector< ConnectionT >::get_source_lcids ( const size_t tid,
const size_t target_node_id,
std::vector< size_t > & source_lcids ) const
inlineoverridevirtual

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

Implements nest::ConnectorBase.

References C_.

◆ get_syn_id()

template<typename ConnectionT>
synindex nest::Connector< ConnectionT >::get_syn_id ( ) const
inlineoverridevirtual

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

Implements nest::ConnectorBase.

References syn_id_.

◆ get_synapse_status()

template<typename ConnectionT>
void nest::Connector< ConnectionT >::get_synapse_status ( const size_t tid,
const size_t lcid,
Dictionary & dict ) const
inlineoverridevirtual

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

Implements nest::ConnectorBase.

References C_, and nest::names::target().

Here is the call graph for this function:

◆ get_target_node_id()

template<typename ConnectionT>
size_t nest::Connector< ConnectionT >::get_target_node_id ( const size_t tid,
const unsigned int lcid ) const
inlineoverridevirtual

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

Implements nest::ConnectorBase.

References C_.

◆ get_target_node_ids()

template<typename ConnectionT>
void nest::Connector< ConnectionT >::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
inlineoverridevirtual

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

Implements nest::ConnectorBase.

References C_.

◆ push_back() [1/2]

template<typename ConnectionT>
void nest::Connector< ConnectionT >::push_back ( ConnectionT && c)
inline

References C_, and register_axonal_delay_correction_required_().

Here is the call graph for this function:

◆ push_back() [2/2]

template<typename ConnectionT>
void nest::Connector< ConnectionT >::push_back ( const ConnectionT & c)
inline

References C_, and register_axonal_delay_correction_required_().

Referenced by nest::GenericConnectorModel< ConnectionT >::add_connection().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ register_axonal_delay_correction_required_()

template<typename ConnectionT>
void nest::Connector< ConnectionT >::register_axonal_delay_correction_required_ ( const ConnectionT & c)
private

Fold a newly added or modified connection into axonal_delay_correction_required_ and the kernel-wide predominant axonal delay flag.

Implemented in connector_base_impl.h.

References axonal_delay_correction_required_, nest::KernelManager::connection_manager, nest::kernel(), and nest::ConnectionManager::register_predominant_axonal_delay().

Referenced by push_back(), push_back(), and set_synapse_status().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ remove_disabled_connections()

template<typename ConnectionT>
void nest::Connector< ConnectionT >::remove_disabled_connections ( const size_t first_disabled_index)
inlineoverridevirtual

Remove disabled connections from the connector.

Implements nest::ConnectorBase.

References C_.

◆ send()

template<typename ConnectionT>
size_t nest::Connector< ConnectionT >::send ( const size_t tid,
const size_t lcid,
const std::vector< ConnectorModel * > & cm,
Event & e )
inlineoverridevirtual

Send the event e to the connection at position lcid.

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

Implements nest::ConnectorBase.

References axonal_delay_correction_required_, C_, send_weight_event(), and syn_id_.

Here is the call graph for this function:

◆ send_to_all()

template<typename ConnectionT>
void nest::Connector< ConnectionT >::send_to_all ( const size_t tid,
const std::vector< ConnectorModel * > & cm,
Event & e )
inlineoverridevirtual

Send the event e to all connections of this Connector.

Implements nest::ConnectorBase.

References C_, and syn_id_.

◆ send_weight_event()

template<typename ConnectionT>
void nest::Connector< ConnectionT >::send_weight_event ( const size_t tid,
const unsigned int lcid,
Event & e,
const CommonSynapseProperties & cp )
overridevirtual

Implements nest::ConnectorBase.

References nest::CommonSynapseProperties::get_weight_recorder(), nest::kernel(), nest::Event::set_delay_steps(), nest::Event::set_port(), nest::Event::set_receiver(), nest::WeightRecorderEvent::set_receiver_node_id(), nest::Event::set_rport(), nest::Event::set_sender_node_id(), nest::Event::set_stamp(), nest::Event::set_weight(), and syn_id_.

Referenced by send().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_source_has_more_targets()

template<typename ConnectionT>
void nest::Connector< ConnectionT >::set_source_has_more_targets ( const size_t lcid,
const bool has_more_targets )
inlineoverridevirtual

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

Implements nest::ConnectorBase.

References C_.

◆ set_synapse_status()

template<typename ConnectionT>
void nest::Connector< ConnectionT >::set_synapse_status ( const size_t tid,
const Dictionary & dict,
ConnectorModel & cm )
inlineoverridevirtual

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

Implements nest::ConnectorBase.

References C_, and register_axonal_delay_correction_required_().

Here is the call graph for this function:

◆ size()

template<typename ConnectionT>
size_t nest::Connector< ConnectionT >::size ( ) const
inlineoverridevirtual

Return the number of connections in this Connector.

Implements nest::ConnectorBase.

References C_.

◆ sort_connections()

template<typename ConnectionT>
void nest::Connector< ConnectionT >::sort_connections ( BlockVector< Source > & )
inlineoverridevirtual

Sort connections according to source node IDs.

Implements nest::ConnectorBase.

References C_, and nest::sort().

Here is the call graph for this function:

◆ trigger_update_weight()

template<typename ConnectionT>
void nest::Connector< ConnectionT >::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 )
inlineoverridevirtual

Update weights of dopamine modulated STDP connections.

Implements nest::ConnectorBase.

References C_, and syn_id_.

Member Data Documentation

◆ axonal_delay_correction_required_

template<typename ConnectionT>
bool nest::Connector< ConnectionT >::axonal_delay_correction_required_
private

Whether any connection held here can ever require a retrospective correction.

Only a connection whose axonal delay is at least its dendritic delay can be reached by a correction, and only such a connection needs the receiving neuron to be able to find its way back to it. Keeping this as a flag on the Connector rather than testing each connection keeps the check out of the per-connection send loop.

Referenced by Connector(), register_axonal_delay_correction_required_(), and send().

◆ C_

◆ syn_id_


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