Cypress
1.0
C++ Spiking Neural Network Simulation Framework
|
#include <connector.hpp>
Public Member Functions | |
std::string | name () const override |
size_t | size (size_t size_src_pop, size_t size_target_pop) const override |
virtual void | connect (const ConnectionDescriptor &descr, std::vector< LocalConnection > &tar) const =0 |
virtual bool | valid (const ConnectionDescriptor &descr) const =0 |
bool | allow_self_connections () const |
Real | additional_parameter () const |
const std::shared_ptr< SynapseBase > | synapse () const |
const std::string | synapse_name () const |
const std::vector< LocalConnection > & | learned_weights () const |
void | _store_learned_weights (std::vector< LocalConnection > &&weights) |
Static Public Member Functions | |
static std::unique_ptr< AllToAllConnector > | all_to_all (Real weight=1.0, Real delay=0.0, bool allow_self_connections=true) |
static std::unique_ptr< AllToAllConnector > | all_to_all (SynapseBase &synapse, bool allow_self_connections=true) |
static std::unique_ptr< OneToOneConnector > | one_to_one (Real weight=1.0, Real delay=0.0) |
static std::unique_ptr< OneToOneConnector > | one_to_one (SynapseBase &synapse) |
static std::unique_ptr< FromListConnector > | from_list (const std::vector< LocalConnection > &connections) |
static std::unique_ptr< FromListConnector > | from_list (std::initializer_list< LocalConnection > connections) |
static std::unique_ptr< FromListConnector > | from_list (const std::vector< LocalConnection > &connections, SynapseBase &synapse) |
static std::unique_ptr< FromListConnector > | from_list (std::initializer_list< LocalConnection > connections, SynapseBase &synapse) |
template<typename F > | |
static std::unique_ptr< FunctorConnector< F > > | functor (const F &cback) |
template<typename F > | |
static std::unique_ptr< UniformFunctorConnector< F > > | functor (const F &cback, Real weight, Real delay=0.0) |
static std::unique_ptr< FixedProbabilityConnector< std::default_random_engine > > | fixed_probability (std::unique_ptr< Connector > connector, Real p, bool allow_self_connections=true) |
static std::unique_ptr< FixedProbabilityConnector< std::default_random_engine > > | fixed_probability (std::unique_ptr< Connector > connector, Real p, size_t seed, bool allow_self_connections=true) |
static std::unique_ptr< RandomConnector< std::default_random_engine > > | random (Real weight=1, Real delay=0, Real probability=1, bool allow_self_connections=true) |
static std::unique_ptr< RandomConnector< std::default_random_engine > > | random (SynapseBase &synapse, Real probability=1, bool allow_self_connections=true) |
static std::unique_ptr< RandomConnector< std::default_random_engine > > | random (Real weight, Real delay, Real probability, size_t seed, bool allow_self_connections=true) |
static std::unique_ptr< RandomConnector< std::default_random_engine > > | random (SynapseBase &synapse, Real probability, size_t seed, bool allow_self_connections=true) |
static std::unique_ptr< FixedFanInConnector< std::default_random_engine > > | fixed_fan_in (size_t n_fan_in, Real weight, Real delay=0.0, bool allow_self_connections=true) |
static std::unique_ptr< FixedFanInConnector< std::default_random_engine > > | fixed_fan_in (size_t n_fan_in, SynapseBase &synapse, bool allow_self_connections=true) |
static std::unique_ptr< FixedFanInConnector< std::default_random_engine > > | fixed_fan_in (size_t n_fan_in, Real weight, Real delay, size_t seed, bool allow_self_connections=true) |
static std::unique_ptr< FixedFanInConnector< std::default_random_engine > > | fixed_fan_in (size_t n_fan_in, SynapseBase &synapse, size_t seed, bool allow_self_connections=true) |
static std::unique_ptr< FixedFanOutConnector< std::default_random_engine > > | fixed_fan_out (size_t n_fan_out, Real weight, Real delay=0.0, bool allow_self_connections=true) |
static std::unique_ptr< FixedFanOutConnector< std::default_random_engine > > | fixed_fan_out (size_t n_fan_out, SynapseBase &synapse, bool allow_self_connections=true) |
static std::unique_ptr< FixedFanOutConnector< std::default_random_engine > > | fixed_fan_out (size_t n_fan_out, Real weight, Real delay, size_t seed, bool allow_self_connections=true) |
static std::unique_ptr< FixedFanOutConnector< std::default_random_engine > > | fixed_fan_out (size_t n_fan_out, SynapseBase &synapse, size_t seed, bool allow_self_connections=true) |
Protected Attributes | |
std::shared_ptr< SynapseBase > | m_synapse |
std::vector< LocalConnection > | m_weights |
Real | m_additional_parameter = 0.0 |
bool | m_self_connections = true |
bool | m_seed_given = false |
|
inlineinherited |
Used internally to store the learned weights
weights | matrix of new weights |
|
inlineinherited |
|
inlinestaticinherited |
Creates an all-to-all connector and returns a pointer at the connector.
weight | is the synaptic weight that should be used for all connections. |
delay | is the synaptic delay that should be used for all connections. |
allow_self_connections | Flag which either allows (true) or forbids self connections if the source and target population are the same |
Inline methods
|
inlinestaticinherited |
Creates an all-to-all connector and returns a pointer at the connector.
synapse | Synapse object containing model and parameters |
allow_self_connections | Flag which either allows (true) or forbids self connections if the source and target population are the same |
|
inlineinherited |
Flag which either allows (true) or forbids self connections if the source and target population are the same
|
pure virtualinherited |
Tells the Connector to actually create the neuron-to-neuron connections between certain neurons.
descr | is the connection descriptor containing the data detailing the connection. |
tar | is the vector the connections should be appended to. |
Implemented in cypress::FixedFanOutConnector< RandomEngine >, cypress::FixedFanInConnector< RandomEngine >, cypress::FixedProbabilityConnector< RandomEngine >, cypress::UniformFunctorConnector< Callback >, cypress::FunctorConnector< Callback >, cypress::FromListConnector, cypress::OneToOneConnector, and cypress::AllToAllConnector.
|
inlinestaticinherited |
Connector which randomly selects neurons from the source population and ensures a fixed fan in (number of incomming connections) in each of the target neurons.
n_fan_in | is the fan in that should be ensured. |
weight | is the connection weight. |
delay | is the synaptic delay. |
allow_self_connections | Flag which either allows (true) or forbids self connections if the source and target population are the same |
|
inlinestaticinherited |
Connector which randomly selects neurons from the source population and ensures a fixed fan in (number of incomming connections) in each of the target neurons.
n_fan_in | is the fan in that should be ensured. |
synapse | Synapse object containing model and parameters |
allow_self_connections | Flag which either allows (true) or forbids self connections if the source and target population are the same |
|
inlinestaticinherited |
Connector which randomly selects neurons from the source population and ensures a fixed fan in (number of incomming connections) in each of the target neurons. Uses the given seed for the initialization of the random engine.
n_fan_in | is the fan in that should be ensured. |
weight | is the connection weight. |
delay | is the synaptic delay. |
seed | is the seed that should be used in order to initialize the random engine. |
allow_self_connections | Flag which either allows (true) or forbids self connections if the source and target population are the same |
|
inlinestaticinherited |
Connector which randomly selects neurons from the source population and ensures a fixed fan in (number of incomming connections) in each of the target neurons. Uses the given seed for the initialization of the random engine.
n_fan_in | is the fan in that should be ensured. |
synapse | Synapse object containing model and parameters |
seed | is the seed that should be used in order to initialize the random engine. |
allow_self_connections | Flag which either allows (true) or forbids self connections if the source and target population are the same |
|
inlinestaticinherited |
Connector which randomly selects neurons from the target population and ensures a fixed fan out (number of outgoing connections) in each of the source neurons.
n_fan_out | is the fan out that should be ensured. |
weight | is the connection weight. |
delay | is the synaptic delay. |
allow_self_connections | Flag which either allows (true) or forbids self connections if the source and target population are the same |
|
inlinestaticinherited |
Connector which randomly selects neurons from the target population and ensures a fixed fan out (number of outgoing connections) in each of the source neurons.
n_fan_out | is the fan out that should be ensured. |
synapse | Synapse object containing model and parameters |
allow_self_connections | Flag which either allows (true) or forbids self connections if the source and target population are the same |
|
inlinestaticinherited |
Connector which randomly selects neurons from the target population and ensures a fixed fan out (number of outgoing connections) in each of the source neurons. Uses the given seed for the initialization of the random engine.
n_fan_out | is the fan out that should be ensured. |
weight | is the connection weight. |
delay | is the synaptic delay. |
seed | is the seed that should be used in order to initialize the random engine. |
allow_self_connections | Flag which either allows (true) or forbids self connections if the source and target population are the same |
|
inlinestaticinherited |
Connector which randomly selects neurons from the target population and ensures a fixed fan out (number of outgoing connections) in each of the source neurons. Uses the given seed for the initialization of the random engine.
n_fan_out | is the fan out that should be ensured. |
synapse | Synapse object containing model and parameters |
seed | is the seed that should be used in order to initialize the random engine. |
allow_self_connections | Flag which either allows (true) or forbids self connections if the source and target population are the same |
|
inlinestaticinherited |
Connector adapter which ensures connections are only produced with a certain probability.
connector | another connector that should be modified by this connector. |
p | probability with which an connection is created. |
|
inlinestaticinherited |
Connector adapter which ensures connections are only produced with a certain probability.
connector | another connector that should be modified by this connector. |
p | probability with which an connection is created. |
seed | is the seed the random number generator should be initialised with. |
allow_self_connections | Flag which either allows (true) or forbids self connections if the source and target population are the same |
|
inlinestaticinherited |
Create a list connector which creates connections according to the given list.
connections | is a list of connections that should be created. |
|
inlinestaticinherited |
Create a list connector which creates connections according to the given list.
connections | is a list of connections that should be created. |
|
inlinestaticinherited |
Create a list connector which creates connections according to the given list.
connections | is a list of connections that should be created. |
synapse | prototype synapse for non-standard synapses |
|
inlinestaticinherited |
Create a list connector which creates connections according to the given list.
connections | is a list of connections that should be created. |
synapse | prototype synapse for non-standard synapses |
|
inlinestaticinherited |
Create a list connector which creates connections according to the given list.
cback | is a function which is called for each neuron-pair in the two populations and which is supposed to return a synapse description. If the returned synapse is invalid, no connection is created. |
|
inlinestaticinherited |
Create a list connector which creates connections according to the given list.
cback | is a function which is called for each neuron-pair in the two populations and which is supposed to return a synapse description. If the returned synapse is invalid, no connection is created. |
weight | is the synaptic weight that should be used for all connections. |
delay | is the synaptic delay that should be used for all connections. |
|
inlineinherited |
Returns a vector of (source, target, weight, delay) for learning synapses The returned structure can be used for a new FromListConnector...
|
inlineoverridevirtual |
Function which should return a name identifying the connector type – this name can be used for printing error messages or for visualisation purposes.
Implements cypress::Connector.
|
inlinestaticinherited |
Create a a one-to-one connector and returns a pointer at the connector.
weight | is the synaptic weight that should be used for all connections. |
delay | is the synaptic delay that should be used for all connections. |
|
inlinestaticinherited |
Creates an one-to-one connector and returns a pointer at the connector.
synapse | Synapse object containing model and parameters |
|
inlinestaticinherited |
Connector adapter which ensures connections are only produced with a certain probability.
weight | is the synaptic weight that should be used for all connections. |
delay | is the synaptic delay that should be used for all connections. |
probability | probability with which an connection is created. |
allow_self_connections | Flag which either allows (true) or forbids self connections if the source and target population are the same |
|
inlinestaticinherited |
Connector adapter which ensures connections are only produced with a certain probability.
synapse | Synapse object containing model and parameters |
probability | probability with which an connection is created. |
allow_self_connections | Flag which either allows (true) or forbids self connections if the source and target population are the same |
|
inlinestaticinherited |
Connector adapter which ensures connections are only produced with a certain probability.
weight | is the synaptic weight that should be used for all connections. |
delay | is the synaptic delay that should be used for all connections. |
probability | probability with which an connection is created. |
seed | is the seed the random number generator should be initialised with. |
allow_self_connections | Flag which either allows (true) or forbids self connections if the source and target population are the same |
|
inlinestaticinherited |
Connector adapter which ensures connections are only produced with a certain probability.
synapse | Synapse object containing model and parameters |
probability | probability with which an connection is created. |
seed | is the seed the random number generator should be initialised with. |
allow_self_connections | Flag which either allows (true) or forbids self connections if the source and target population are the same |
|
inlineoverridevirtual |
Returns the number of connections created with this connector and given pop sizes
size_src_pop | Size of source population |
size_target_pop | Size of target population |
Implements cypress::Connector.
|
inlineinherited |
Returns a pointer to the underlying synapse object used in the connector
|
inlineinherited |
Directly access the name of the synapse model
|
pure virtualinherited |
Returns true if the connector can create the connections for the given connection descriptor. While most connectors will always be able to create a connection, for example a one-to-one connector
Implemented in cypress::FixedFanOutConnector< RandomEngine >, cypress::FixedFanInConnector< RandomEngine >, cypress::FixedProbabilityConnector< RandomEngine >, cypress::UniformFunctorConnector< Callback >, cypress::FunctorConnector< Callback >, cypress::FromListConnector, cypress::OneToOneConnector, and cypress::AllToAllConnector.
|
protectedinherited |
A additional parameter a connector might use (e.g. probability)
|
protectedinherited |
If a random connector is created with seed, we need this flag to not use the high level connectors of a backend, but generating connections here and using a list-connector
|
protectedinherited |
Flag for allowing neuron self connections if source and target population are identical
|
protectedinherited |
Synapse model
|
protectedinherited |
This where learned weights are stored (e.g. using STDP)