#ifndef SYNAPSE_H #define SYNAPSE_H #include using namespace boost::intrusive; class Neuron; class Synapse { public: Synapse(); // functions void computePostsynapticPulse(double &time, double ¤t); // given an input time and current calculate their output value void evolve(double time); void stdp(double dt); static void updateTopology(); // recreate all sin/sout lists in the neurons // reflection template bool reflect(Action &a); typedef int id_type; static id_type numElements(); static Synapse * singleton(id_type num); // return neuron # num static id_type numSynapses; // model specifics int src, dst; // pre- and postsynaptic neuron double weight; // [V] double eligibility; // [?] double delay; // total delay from presynaptic axon hillock to postsynaptic axon hillock bool constant; // if the weight can change (HINT: weight < 0 implies constness, too) // sim helper vars double firstSpike, // time the first/last spike arrived at it's dst neuron in a given interval lastSpike; // HINT: firstSpike is set to -INFINITY every time after it is processed // by the STDP rule double evolvedUntil; // up to wich time has the model been evolved // hock to use intrusive lists (defined in neuron.h) slist_member_hook<> hook_src, hook_dst; }; const int maxSynapses = 200000; Synapse syn[maxSynapses]; #endif // SYNAPSE_H