Cypress
1.0
C++ Spiking Neural Network Simulation Framework
|
#include <connector.hpp>
Public Member Functions | |
FixedFanInConnector (size_t n_fan_in, Real weight, Real delay, std::shared_ptr< RandomEngine > engine, bool self_connections) | |
FixedFanInConnector (size_t n_fan_in, SynapseBase &synapse, std::shared_ptr< RandomEngine > engine, bool self_connections) | |
~FixedFanInConnector () override=default | |
void | connect (const ConnectionDescriptor &descr, std::vector< LocalConnection > &tar) const override |
bool | valid (const ConnectionDescriptor &descr) const override |
std::string | name () const override |
size_t | size (size_t, size_t size_target_pop) const override |
void | seed_given () |
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 Member Functions | |
template<typename F > | |
void | generate_connections (size_t offs, size_t len, size_t subset_len, size_t i0, size_t i1, const F &f, bool self) const |
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 |
Connects each neuron in the target population with a fixed number of neurons in the source population.
|
inline |
|
inline |
|
overridedefault |
|
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
|
inlineoverridevirtual |
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. |
Implements cypress::Connector.
|
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. |
|
inlineprotectedinherited |
|
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 |
|
inlineinherited |
Internally used to switch off backend connectors and use lists generated with the seed and random engine provided
|
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
|
inlineoverridevirtual |
Checks the validity of the connection. For the FixedFanInConnector to be valid, the number of neurons in the source population must be at least equal to the fan in.
Implements cypress::Connector.
|
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)