NEST main@f146f75
Loading...
Searching...
No Matches
nest::Connection< targetidentifierT, DelayTypeT > Class Template Reference

Base class for representing connections. More...

#include <connection.h>

Inheritance diagram for nest::Connection< targetidentifierT, DelayTypeT >:
[legend]

Public Member Functions

 Connection ()
 Connection (const Connection< targetidentifierT, DelayTypeT > &rhs)=default
Connection & operator= (const Connection< targetidentifierT, DelayTypeT > &rhs)=default
std::unique_ptr< SecondaryEvent > get_secondary_event ()
 Get a pointer to an instance of a SecondaryEvent if this connection supports secondary events.
void get_status (Dictionary &d) const
 Get all properties of this connection and put them into a dictionary.
void set_status (const Dictionary &d, ConnectorModel &cm)
 Set properties of this connection from the values given in dictionary.
void check_synapse_params (const Dictionary &d) const
 Check syn_spec dictionary for parameters that are not allowed with the given connection.
void calibrate (const TimeConverter &)
 Calibrate the delay of this connection to the desired resolution.
void correct_weight_stdp_ax_delay (const size_t tid, CorrectionEntrySTDPAxDelay &entry, const double t_spike_critical_interval_end, const double t_post_spike, const CommonSynapseProperties &)
 Framework for STDP with predominantly axonal delays: Correct this synapse and the corresponding previously sent spike taking into account a new post-synaptic spike.
double get_dendritic_delay_ms () const
 Return the proportion of the transmission delay attributed to the dendrite.
long get_dendritic_delay_steps () const
 Return the proportion of the transmission delay attributed to the dendrite.
void set_dendritic_delay_ms (const double d)
 Set the proportion of the transmission delay attributed to the dendrite.
void set_dendritic_delay_steps (const long d)
 Set the proportion of the transmission delay attributed to the dendrite.
void set_axonal_delay_ms (const double d)
 Set the proportion of the transmission delay attributed to the axon.
double get_axonal_delay_ms () const
 Get the proportion of the transmission delay attributed to the axon.
void set_axonal_delay_steps (const long d)
 Set the proportion of the transmission delay attributed to the axon.
double get_axonal_delay_steps () const
 Get the proportion of the transmission delay attributed to the axon.
double get_delay_ms () const
 Return the delay of the connection in ms.
long get_delay_steps () const
 Return the delay of the connection in steps.
void set_delay_ms (const double d)
 Set the delay of the connection.
void set_delay_steps (const long d)
 Set the delay of the connection in steps.
long get_label () const
void trigger_update_weight (const size_t, const std::vector< spikecounter > &, const double, const CommonSynapseProperties &)
 Triggers an update of a synaptic weight.
Node * get_target (const size_t tid) const
size_t get_rport () const
void set_source_has_more_targets (const bool more_targets)
 Sets a flag in the connection to signal that the following connection has the same source.
bool source_has_more_targets () const
 Returns a flag denoting whether the connection has source subsequent targets.
void disable ()
 Disables the synapse.
bool is_disabled () const
 Returns a flag denoting if the synapse is disabled.

Static Public Attributes

static constexpr bool requires_axonal_delay_correction = std::is_same< DelayTypeT, AxonalDendriticDelay >::value
static constexpr ConnectionModelProperties properties = ConnectionModelProperties::NONE
static constexpr bool supports_flush_event = false

Protected Member Functions

void check_connection_ (Node &dummy_target, Node &source, Node &target, const synindex syn_id, const size_t receptor_type)
 This function calls check_connection() on the sender to check if the receiver accepts the event type and receptor type requested by the sender.

Protected Attributes

targetidentifierT target_
bool more_targets_: 1
bool disabled_: 1
DelayTypeT delay_

Detailed Description

template<typename targetidentifierT, typename DelayTypeT>
class nest::Connection< targetidentifierT, DelayTypeT >

Base class for representing connections.

It provides the mandatory properties receiver port and target, as well as the functions get_status() and set_status() to read and write them. A suitable Connector containing these connections can be obtained from the template GenericConnector.

Note
Please note that the event received by the send() function is a reference to a single object that is re-used by each Connection. This means that the object must not be changed in the Connection, or if needs to be changed, everything has to be reset after sending (i.e. after Event::operator() has been called).

Constructor & Destructor Documentation

◆ Connection() [1/2]

template<typename targetidentifierT, typename DelayTypeT>
nest::Connection< targetidentifierT, DelayTypeT >::Connection ( )
inline

◆ Connection() [2/2]

template<typename targetidentifierT, typename DelayTypeT>
nest::Connection< targetidentifierT, DelayTypeT >::Connection ( const Connection< targetidentifierT, DelayTypeT > & rhs)
default

Member Function Documentation

◆ calibrate()

template<typename targetidentifierT, typename DelayTypeT>
void nest::Connection< targetidentifierT, DelayTypeT >::calibrate ( const TimeConverter & tc)
inline

Calibrate the delay of this connection to the desired resolution.

References delay_.

◆ check_connection_()

template<typename targetidentifierT, typename DelayTypeT>
void nest::Connection< targetidentifierT, DelayTypeT >::check_connection_ ( Node & dummy_target,
Node & source,
Node & target,
const synindex syn_id,
const size_t receptor_type )
inlineprotected

This function calls check_connection() on the sender to check if the receiver accepts the event type and receptor type requested by the sender.

Parameters
sThe source node
rThe target node
receptorThe ID of the requested receptor type
thelast spike produced by the presynaptic neuron (for STDP and maturing connections)

References target_.

◆ check_synapse_params()

template<typename targetidentifierT, typename DelayTypeT>
void nest::Connection< targetidentifierT, DelayTypeT >::check_synapse_params ( const Dictionary & d) const
inline

Check syn_spec dictionary for parameters that are not allowed with the given connection.

Will issue warning or throw error if an illegal parameter is found. The method does nothing if no illegal parameter is found.

Note
Classes requiring checks need to override the function with their own implementation, as this base class implementation does not do anything.
See also
ConnectorModel::check_synapse_params

◆ correct_weight_stdp_ax_delay()

template<typename targetidentifierT, typename DelayTypeT>
void nest::Connection< targetidentifierT, DelayTypeT >::correct_weight_stdp_ax_delay ( const size_t tid,
CorrectionEntrySTDPAxDelay & entry,
const double t_spike_critical_interval_end,
const double t_post_spike,
const CommonSynapseProperties &  )
inline

Framework for STDP with predominantly axonal delays: Correct this synapse and the corresponding previously sent spike taking into account a new post-synaptic spike.

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

◆ disable()

template<typename targetidentifierT, typename DelayTypeT>
void nest::Connection< targetidentifierT, DelayTypeT >::disable ( )
inline

Disables the synapse.

See also
is_disabled

◆ get_axonal_delay_ms()

template<typename targetidentifierT, typename DelayTypeT>
double nest::Connection< targetidentifierT, DelayTypeT >::get_axonal_delay_ms ( ) const
inline

Get the proportion of the transmission delay attributed to the axon.

◆ get_axonal_delay_steps()

template<typename targetidentifierT, typename DelayTypeT>
double nest::Connection< targetidentifierT, DelayTypeT >::get_axonal_delay_steps ( ) const
inline

Get the proportion of the transmission delay attributed to the axon.

◆ get_delay_ms()

template<typename targetidentifierT, typename DelayTypeT>
double nest::Connection< targetidentifierT, DelayTypeT >::get_delay_ms ( ) const
inline

Return the delay of the connection in ms.

◆ get_delay_steps()

template<typename targetidentifierT, typename DelayTypeT>
long nest::Connection< targetidentifierT, DelayTypeT >::get_delay_steps ( ) const
inline

Return the delay of the connection in steps.

◆ get_dendritic_delay_ms()

template<typename targetidentifierT, typename DelayTypeT>
double nest::Connection< targetidentifierT, DelayTypeT >::get_dendritic_delay_ms ( ) const
inline

Return the proportion of the transmission delay attributed to the dendrite.

◆ get_dendritic_delay_steps()

template<typename targetidentifierT, typename DelayTypeT>
long nest::Connection< targetidentifierT, DelayTypeT >::get_dendritic_delay_steps ( ) const
inline

Return the proportion of the transmission delay attributed to the dendrite.

◆ get_label()

template<typename targetidentifierT, typename DelayTypeT>
long nest::Connection< targetidentifierT, DelayTypeT >::get_label ( ) const
inline

◆ get_rport()

template<typename targetidentifierT, typename DelayTypeT>
size_t nest::Connection< targetidentifierT, DelayTypeT >::get_rport ( ) const
inline

◆ get_secondary_event()

template<typename targetidentifierT, typename DelayTypeT>
std::unique_ptr< SecondaryEvent > nest::Connection< targetidentifierT, DelayTypeT >::get_secondary_event ( )

Get a pointer to an instance of a SecondaryEvent if this connection supports secondary events.

To prevent erronous calls of this function on primary connections, the base class implementation below just contains assert(false).

◆ get_status()

template<typename targetidentifierT, typename DelayTypeT>
void nest::Connection< targetidentifierT, DelayTypeT >::get_status ( Dictionary & d) const
inline

Get all properties of this connection and put them into a dictionary.

References delay_, and target_.

◆ get_target()

template<typename targetidentifierT, typename DelayTypeT>
Node * nest::Connection< targetidentifierT, DelayTypeT >::get_target ( const size_t tid) const
inline

◆ is_disabled()

template<typename targetidentifierT, typename DelayTypeT>
bool nest::Connection< targetidentifierT, DelayTypeT >::is_disabled ( ) const
inline

Returns a flag denoting if the synapse is disabled.

See also
disable

◆ operator=()

template<typename targetidentifierT, typename DelayTypeT>
Connection & nest::Connection< targetidentifierT, DelayTypeT >::operator= ( const Connection< targetidentifierT, DelayTypeT > & rhs)
default

◆ set_axonal_delay_ms()

template<typename targetidentifierT, typename DelayTypeT>
void nest::Connection< targetidentifierT, DelayTypeT >::set_axonal_delay_ms ( const double d)
inline

Set the proportion of the transmission delay attributed to the axon.

◆ set_axonal_delay_steps()

template<typename targetidentifierT, typename DelayTypeT>
void nest::Connection< targetidentifierT, DelayTypeT >::set_axonal_delay_steps ( const long d)
inline

Set the proportion of the transmission delay attributed to the axon.

◆ set_delay_ms()

template<typename targetidentifierT, typename DelayTypeT>
void nest::Connection< targetidentifierT, DelayTypeT >::set_delay_ms ( const double d)
inline

Set the delay of the connection.

◆ set_delay_steps()

template<typename targetidentifierT, typename DelayTypeT>
void nest::Connection< targetidentifierT, DelayTypeT >::set_delay_steps ( const long d)
inline

Set the delay of the connection in steps.

◆ set_dendritic_delay_ms()

template<typename targetidentifierT, typename DelayTypeT>
void nest::Connection< targetidentifierT, DelayTypeT >::set_dendritic_delay_ms ( const double d)
inline

Set the proportion of the transmission delay attributed to the dendrite.

◆ set_dendritic_delay_steps()

template<typename targetidentifierT, typename DelayTypeT>
void nest::Connection< targetidentifierT, DelayTypeT >::set_dendritic_delay_steps ( const long d)
inline

Set the proportion of the transmission delay attributed to the dendrite.

◆ set_source_has_more_targets()

template<typename targetidentifierT, typename DelayTypeT>
void nest::Connection< targetidentifierT, DelayTypeT >::set_source_has_more_targets ( const bool more_targets)
inline

Sets a flag in the connection to signal that the following connection has the same source.

See also
source_has_more_targets

◆ set_status()

template<typename targetidentifierT, typename DelayTypeT>
void nest::Connection< targetidentifierT, DelayTypeT >::set_status ( const Dictionary & d,
ConnectorModel & cm )
inline

Set properties of this connection from the values given in dictionary.

Note
Target and Rport cannot be changed after a connection has been created.

References delay_.

◆ source_has_more_targets()

template<typename targetidentifierT, typename DelayTypeT>
bool nest::Connection< targetidentifierT, DelayTypeT >::source_has_more_targets ( ) const
inline

Returns a flag denoting whether the connection has source subsequent targets.

See also
set_source_has_more_targets

◆ trigger_update_weight()

template<typename targetidentifierT, typename DelayTypeT>
void nest::Connection< targetidentifierT, DelayTypeT >::trigger_update_weight ( const size_t ,
const std::vector< spikecounter > & ,
const double ,
const CommonSynapseProperties &  )
inline

Triggers an update of a synaptic weight.

This function is needed for neuromodulated synaptic plasticity

Member Data Documentation

◆ delay_

template<typename targetidentifierT, typename DelayTypeT>
DelayTypeT nest::Connection< targetidentifierT, DelayTypeT >::delay_
protected

Referenced by calibrate(), get_status(), and set_status().

◆ disabled_

template<typename targetidentifierT, typename DelayTypeT>
bool nest::Connection< targetidentifierT, DelayTypeT >::disabled_
protected

◆ more_targets_

template<typename targetidentifierT, typename DelayTypeT>
bool nest::Connection< targetidentifierT, DelayTypeT >::more_targets_
protected

◆ properties

template<typename targetidentifierT, typename DelayTypeT>
ConnectionModelProperties nest::Connection< targetidentifierT, DelayTypeT >::properties = ConnectionModelProperties::NONE
staticconstexpr

◆ requires_axonal_delay_correction

template<typename targetidentifierT, typename DelayTypeT>
bool nest::Connection< targetidentifierT, DelayTypeT >::requires_axonal_delay_correction = std::is_same< DelayTypeT, AxonalDendriticDelay >::value
staticconstexpr

◆ supports_flush_event

template<typename targetidentifierT, typename DelayTypeT>
bool nest::Connection< targetidentifierT, DelayTypeT >::supports_flush_event = false
staticconstexpr

◆ target_


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