57 template<
class Archive>
58 void serialize(Archive & ar,
const unsigned int version)
71 virtual void virtual_serialize(boost::archive::binary_oarchive & ar,
const unsigned int version )
73 ar & m_rows & n_cols & connection_name;
79 virtual void virtual_serialize(boost::archive::binary_iarchive & ar,
const unsigned int version )
81 ar & m_rows & n_cols & connection_name;
285 BOOST_SERIALIZATION_ASSUME_ABSTRACT(
Connection)
290 const NeuronID localid = target_group->global2rank(
id);
291 target_state->data[localid]+=amount;
virtual void propagate()=0
Propagate method to propagate spikes. Called by System run method.
void set_receptor(AurynStateVector *ptr)
Same as set_target.
Definition: Connection.cpp:152
TransmitterType get_transmitter()
Returns transmitter type.
Definition: Connection.cpp:106
Standard Glutamatergic (excitatory) transmission.
Definition: auryn_definitions.h:139
NeuronID number_of_spike_attributes
Number of spike attributes to expect with each spike transmitted through this connection.
Definition: Connection.h:99
std::string get_log_name()
Returns a string which is the combination of file and connection name for logging.
Definition: Connection.cpp:98
Connection()
Definition: Connection.cpp:30
Trace * get_post_trace(const AurynDouble tau)
Returns a pointer to a postsynaptic trace object.
Definition: Connection.cpp:265
The abstract base class for all Connection objects in Auryn.
Definition: Connection.h:53
void transmit(const NeuronID id, const AurynWeight amount)
Default way to transmit a spike to a postsynaptic partner.
Definition: Connection.h:294
TransmitterType trans
Definition: Connection.h:84
std::vector< NeuronID > SpikeContainer
Spike container type. Used for storing spikes.
Definition: auryn_definitions.h:161
NeuronGroup * get_destination()
Returns pointer to the postsynaptic group.
Definition: Connection.cpp:203
virtual void evolve()
Evolve method to update internal connection state. Called by System run method.
Definition: Connection.cpp:276
void targeted_transmit(SpikingGroup *target_group, AurynStateVector *target_state, const NeuronID id, const AurynWeight amount)
Transmits a spike to a given target group and state.
Definition: Connection.h:288
virtual bool write_to_file(std::string filename)=0
Implements save to file functionality. Also called in save_network_state from System class...
Abstract base class of all objects producing spikes.
Definition: SpikingGroup.h:67
SpikingGroup * get_source()
Returns pointer to the presynaptic group.
Definition: Connection.cpp:193
void add_number_of_spike_attributes(int x)
Set up spike delay to accomodate x additional spike attributes.
Definition: Connection.cpp:221
double AurynDouble
Higher precision floating point datatype.
Definition: auryn_definitions.h:158
AurynFloat AurynWeight
Unit of synaptic weights.
Definition: auryn_definitions.h:159
SpikingGroup * src
Pointer to the source group of this connection.
Definition: Connection.h:108
Abstract base class of synaptic traces.
Definition: Trace.h:36
virtual bool load_from_file(std::string filename)=0
Implements load from file functionality. Also called in save_network_state from System class...
void set_destination(NeuronGroup *source)
Sets destination SpikingGroup of this connection.
Definition: Connection.cpp:198
NeuronGroup * dst
Pointer to the destination group of this connection.
Definition: Connection.h:111
virtual void stats(AurynDouble &mean, AurynDouble &std, StateID zid=0)=0
Computes mean synaptic weight and std dev of all weights in this connection.
Trace * get_post_state_trace(const string state_name, const AurynDouble tau, const AurynDouble jump_size=0.0)
Returns a pointer to a postsynaptic state trace object.
Definition: Connection.cpp:270
virtual AurynWeight * get_ptr(NeuronID i, NeuronID j)=0
Return pointer to weight element i,j if it exists, otherwise return NULL.
NeuronID get_n_cols()
Get number of columns (postsynaptic) in connection.
Definition: Connection.cpp:183
Definition: ABSConnection.h:38
friend class boost::serialization::access
Definition: Connection.h:56
unsigned long AurynLong
An unsigned long type used to count synapses or similar.
Definition: auryn_definitions.h:154
virtual void virtual_serialize(boost::archive::binary_oarchive &ar, const unsigned int version)
Definition: Connection.h:71
virtual AurynWeight get_data(NeuronID i)=0
Return weight element as index in data array.
void safe_transmit(NeuronID id, AurynWeight amount)
Same as transmit but first checks if the target neuron exists and avoids segfaults that way (but it's...
Definition: Connection.cpp:215
std::string get_file_name()
Extracts the class name of the connection from the file name.
Definition: Connection.cpp:92
void conditional_propagate()
DEPRECATED. (Such connections should not be registered in the first place) Calls propagate only if th...
Definition: Connection.cpp:208
TransmitterType
Specifies the different transmitter types that Auryn knows.
Definition: auryn_definitions.h:138
float AurynFloat
Low precision floating point datatype.
Definition: auryn_definitions.h:157
void init(TransmitterType transmitter=GLUT)
Definition: Connection.cpp:51
virtual void virtual_serialize(boost::archive::binary_iarchive &ar, const unsigned int version)
Definition: Connection.h:79
SpikeContainer * get_post_spikes()
Returns pointer to SpikeContainer for postsynaptic spikes on this node.
Definition: Connection.cpp:236
SpikeContainer * get_pre_spikes()
Supplies pointer to SpikeContainer of all presynaptic spikes.
Definition: Connection.cpp:231
Trace * get_pre_trace(const AurynDouble tau)
Returns a pointer to a presynaptic trace object.
Definition: Connection.cpp:260
virtual void finalize()=0
Finalize Connection after initialization to prepare for use in simulation.
AurynStateVector * target_state_vector
Definition: Connection.h:86
Abstract base class for all neuron groups.
Definition: NeuronGroup.h:45
AurynFloat get_spike_attribute(const NeuronID i, const int attribute_id=0)
Returns spike attribute belonging to the spike at position i in the get_spikes() SpikeContainer.
Definition: Connection.cpp:242
AurynStateVector * get_target_vector()
Returns target state vector if one is defined.
Definition: Connection.cpp:173
NeuronID get_m_rows()
Get number of rows (presynaptic) in connection.
Definition: Connection.cpp:178
Default AurynVectorFloat class for performance computation.
Definition: AurynVector.h:796
NeuronID spike_attribute_offset
Stores spike attribute offset in attribute array.
Definition: Connection.h:102
AurynFloat * target
A more direct reference on the first element of the target_state_vector.
Definition: Connection.h:93
virtual AurynLong get_nonzero()=0
Return number of nonzero elements in this Connection.
void set_transmitter(AurynStateVector *ptr)
Same as set_target.
unsigned int StateID
StateID is an unsigned integeger type used to index synaptic states in Auryn.
Definition: auryn_definitions.h:153
virtual ~Connection()
Definition: Connection.cpp:78
std::string get_name()
Returns name of connection.
Definition: Connection.cpp:87
void set_target(AurynWeight *ptr)
Sets target state of this connection directly via a pointer.
Definition: Connection.cpp:137
void set_size(NeuronID i, NeuronID j)
Definition: Connection.cpp:71
std::string string
Standard library string type which is imported into Auryn namespace.
Definition: auryn_definitions.h:156
unsigned int NeuronID
NeuronID is an unsigned integeger type used to index neurons in Auryn.
Definition: auryn_definitions.h:151
void set_source(SpikingGroup *source)
Sets source SpikingGroup of this connection.
Definition: Connection.cpp:188
void set_name(std::string name)
Set name of connection.
Definition: Connection.cpp:82