superneuromat.Synapse#
- class superneuromat.Synapse(snn=<object object>, idx: int = <object object>, *args, **kwargs)[source]#
Synapse accessor class for synapses in an SNN
Warning
Instances of Synapse are cached at access time as of v3.4.0. i.e.
snn.synapses[0] is snn.synapses[0]. Prior to v3.4.0, new Synapse instances were created on each access.- Attributes:
delayThe delay of before a spike is sent to the post-synaptic neuron.
delay_chainReturns a list of neurons in the delay chain for this synapse.
delay_chain_synapsesA list of synapses in the delay chain for this synapse.
mThe
SNNthat this object is associated with.num_onmodelThe number of synapses in the SNN.
postThe post-synaptic neuron of this synapse.
post_idThe index of the post-synaptic neuron of this synapse.
preThe pre-synaptic neuron of this synapse.
pre_idThe index of the pre-synaptic neuron of this synapse.
stdp_enabledIf
True, STDP learning is enabled on this synapse.weightThe weight of the synapse connecting the pre- and post-synaptic neurons.
Methods
info()Returns a string containing information about this synapse.
info_row()Returns a string containing information about this synapse for use in a table.
row_cont
row_header
- property delay: int[source]#
The delay of before a spike is sent to the post-synaptic neuron.
Currently, the delay cannot be modified once set.
- property delay_chain[source]#
Returns a list of neurons in the delay chain for this synapse.
The list is in the same order that spikes will pass through the chain.
Returns
[]if synapse is not the last synapse in a delay chain.
- property delay_chain_synapses[source]#
A list of synapses in the delay chain for this synapse.
The list is in the same order that spikes will pass through the chain.
Returns
[]if synapse is not the last synapse in a delay chain.
- info()[source]#
Returns a string containing information about this synapse.
Note that a dash
-is used to represent that the synapse is the last in a delay chain. Seecreate_synapse().
- info_row()[source]#
Returns a string containing information about this synapse for use in a table.
Note that a dash
-is used to represent that the synapse is the last in a delay chain. Seecreate_synapse().
- property num_onmodel[source]#
The number of synapses in the SNN.
See also
SNN.num_synapses,SynapseList.__len__