Main Page   Modules   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   Related Pages  

punnets_private::tsynapse_fatigue< debug > Class Template Reference
[Synapses]

#include <dneuron.h>

Inheritance diagram for punnets_private::tsynapse_fatigue< debug >:

punnets_common::tsynapse_base punnets_common::taction List of all members.

Public Methods

 tsynapse_fatigue (tneuron_base &isrc, tneuron_base &idest, real idelay, real iweight)
 Construct a synapse with the specified source, destination, delay and initial weight.

 tsynapse_fatigue (tneuron_base &idest, real idelay, real iweight)
virtual real getWeight () const
 Get the weight value of this synapse.

virtual tneuron_base & getSrc () const
 Get the source neuron (pre-synaptic).

virtual tneuron_base & getDest () const
 Get the destination neuron (post-synaptic).

void addWeight (real delta_w)
 Modify the weight value with the specified step size.

void addDelay (ntime_t delta_d)
 Modify the delay with the specified step size.

virtual void activate (tscheduler &scheduler, ntime_t current_time)
virtual const char * getClassName () const
 Obtains the class name of this neuron.


Static Protected Attributes

const ntime_t recover_hv_period = 2000
 The time of half-value period of the synapse weight decrease.

const real fire_ratio = 0.002
 The ratio of the decay of the weight caused by one pulse deliver.


Detailed Description

template<bool debug>
class punnets_private::tsynapse_fatigue< debug >

The "fatigue" synapse class. This class of synapses delivers a pulse to the destination (post-synaptic) neuron, whose strength decays on bursting (by lack of energy) and recovers gradually. This is a sample for constructing more complex synapse class.

Definition at line 363 of file dneuron.h.


Constructor & Destructor Documentation

template<bool debug>
punnets_private::tsynapse_fatigue< debug >::tsynapse_fatigue tneuron_base &    idest,
real    idelay,
real    iweight
[inline]
 

Construct a synapse with the specified destination, delay and initial weight. Source neuron will be specified after the construction via setSrc() method.

Definition at line 383 of file dneuron.h.

References punnets_common::real.

00384         : tsynapse_base(idelay), src(NULL), dest(&idest), weight(iweight / fire_ratio), last_fire( -Infinity ), last_weight(weight) { }


Member Function Documentation

template<bool debug>
virtual void punnets_private::tsynapse_fatigue< debug >::activate tscheduler &    scheduler,
ntime_t    current_time
[inline, virtual]
 

The event handler delivers a pulse to the destination (post-synaptic) neuron. Then the last firing time is recorded to process the fatigueness.

Implements punnets_common::tsynapse_base.

Definition at line 401 of file dneuron.h.

References punnets_common::ntime_t, and punnets_common::real.

00402     {
00403         real this_weight = weight + (last_weight - weight) * exp( (current_time - last_fire) * (-M_LN2 / recover_hv_period) );
00404         if( getDeb() )
00405             std::cout << std::setw(9) << std::setiosflags(std::ios::fixed) << std::setprecision(debug_precision) << current_time << " " << dest->getName() << 
00406             " Pulse Arrived from " << src->getName() << "(" << this_weight * fire_ratio << "/" << weight << ")" << std::endl;
00407         dest->pulseArrive( scheduler, current_time, this_weight * fire_ratio );
00408         last_fire = current_time;
00409         last_weight = this_weight * (1.0 - fire_ratio);
00410     }


The documentation for this class was generated from the following file:
Generated on Mon Jun 16 15:42:29 2003 for Punnets by doxygen1.2.18