#include <dneuron.h>
Inheritance diagram for punnets_private::tsynapse_fatigue< debug >:

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. | |
Definition at line 363 of file dneuron.h.
|
||||||||||||||||||||
|
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) { } |
|
||||||||||||||||
|
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 }
|
1.2.18