22 "Name",
"STDPSynHandler",
23 "Author",
"Aditya Gilra",
25 "The STDPSynHandler handles synapses with spike timing dependent plasticity (STDP). "
26 "It uses two priority queues to manage pre and post spikes."
31 "aMinus is a post-synaptic variable that keeps a decaying 'history' of previous post-spike(s)"
32 "and is used to update the synaptic weight when a pre-synaptic spike appears."
33 "It determines the t_pre > t_post (pre after post) part of the STDP window.",
40 "aMinus0 is added to aMinus on every pre-spike",
47 "aMinus decays with tauMinus time constant",
54 "aPlus0 is added to aPlus on every pre-spike",
61 "aPlus decays with tauPlus time constant",
68 "an upper bound on the weight",
75 "a lower bound on the weight",
81 "Handles arriving spike messages from post-synaptic neuron, inserts into postEvent queue.",
86 "Sets up field Elements for synapse",
104 static Finfo* STDPSynHandlerFinfos[] = {
120 STDPSynHandlerFinfos,
121 sizeof( STDPSynHandlerFinfos ) /
sizeof (
Finfo* ),
124 sizeof( doc ) /
sizeof(
string )
149 for ( vector< STDPSynapse >::iterator
151 i->setHandler(
this );
165 unsigned int prevSize =
synapses_.size();
167 for (
unsigned int i = prevSize; i < v; ++i )
181 cout <<
"Warning: STDPSynHandler::getSynapse: index: " << i <<
182 " is out of range: " <<
synapses_.size() << endl;
187 unsigned int index,
double time,
double weight )
207 double activation = 0.0;
213 unsigned int synIndex = currEvent.
synIndex;
249 if ( activation != 0.0 )
258 for (
unsigned int i=0; i<
synapses_.size(); i++) {
279 for (
unsigned int i=0; i<
synapses_.size(); i++) {
306 unsigned int newSynIndex =
synapses_.size();
308 synapses_[newSynIndex].setHandler(
this );
unsigned int vGetNumSynapses() const
STDPSynapse * vGetSynapse(unsigned int i)
priority_queue< PostSynEvent, vector< PostSynEvent >, ComparePostSynEvent > postEvents_
void setNumSynapses(unsigned int num)
void vReinit(const Eref &e, ProcPtr p)
void setWeightMin(double v)
double getWeightMin() const
double getTauPlus() const
void setTauMinus(double v)
static DestFinfo dummy("dummy","This Finfo is a dummy. If you are reading this you have used an invalid index", 0)
unsigned int getNumSynapses() const
void vProcess(const Eref &e, ProcPtr p)
double getTopSpike(unsigned int index) const
void addSpike(unsigned int index, double time, double weight)
static const Cinfo * initCinfo()
Synapse * getSynapse(unsigned int i)
void dropSynapse(unsigned int droppedSynNumber)
void setTauPlus(double v)
vector< STDPSynapse > synapses_
static const Cinfo * initCinfo()
void setAMinus0(double v)
void setWeightMax(double v)
double getTauMinus() const
priority_queue< PreSynEvent, vector< PreSynEvent >, CompareSynEvent > events_
void vSetNumSynapses(unsigned int num)
bool rangeWarning(const string &field, double value)
double getAMinus0() const
static SrcFinfo1< double > * activationOut()
unsigned int addSynapse()
Adds a new synapse, returns its index.
static const Cinfo * initCinfo()
static const Cinfo * synHandlerCinfo
static const Cinfo * STDPSynHandlerCinfo
STDPSynHandler & operator=(const STDPSynHandler &other)
double getWeightMax() const
void addPostSpike(const Eref &e, double time)