CSIM: spikingsynapse.h Source File

spikingsynapse.h

Go to the documentation of this file.
00001 
00005 #ifndef _SPIKINGSYNAPSE_H_
00006 #define _SPIKINGSYNAPSE_H_
00007 
00008 #include "synapse.h"
00009 
00010 class SpikingSynapse;
00011 
00012 typedef int (SpikingSynapse:: *pSpikeHandler)(void); // pointer of spike handler routine
00013 
00014 class SpikingSynapse;
00015 
00016 #define NEED_TO_ACTIVATE \
00017   /* since psr = psr*decay in the same time step we undo this first */ \
00018   /* psr /= decay; */ \
00019   /* do we need to activate this synapse? */ \
00020   register bool activate = (steps2cutoff == 0); \
00021   /* now calc the new cutoff point */ \
00022   steps2cutoff = (int)(PSR_MULTIPLE_TAU*tau/DT+0.5); \
00023   return activate; 
00024 
00026 
00034 class SpikingSynapse : public Synapse {
00035  public:
00036 
00037   // The default constructor
00038   SpikingSynapse(void);
00039 
00040   // The destructor
00041   virtual ~SpikingSynapse(void);
00042 
00043   // Advance the state of the Synapse
00044   virtual int advance(void);
00045 
00046   // Reset to initial condition.
00047   virtual void reset(void);
00048 
00049   // Update internal variables
00050   virtual int updateInternal(void);
00051 
00052 
00055 
00064   // float p;
00065 
00067 
00069   float tau;
00070 
00071   inline bool checkForActivation(void);
00072 
00074 
00080   virtual int preSpikeHit(void);
00081 
00083   virtual int addIncoming(Advancable *a);
00084 
00086   virtual int addOutgoing(Advancable *a);
00087 
00088  protected:
00089 
00090   int steps2cutoff;
00091   
00093 
00095   double decay;
00096 
00097 };
00098 
00099 #endif

 
(C) 2003, Thomas Natschläger last modified 07/10/2006