AlphaInfiniteSpikeResponse.h

Go to the documentation of this file.
00001 #ifndef ALPHAINFINITESPIKERESPONSE_H_
00002 #define ALPHAINFINITESPIKERESPONSE_H_
00003 
00004 #include "InfiniteSpikeResponse.h"
00005 
00007 
00012 class AlphaInfiniteSpikeResponse : public InfiniteSpikeResponse
00013 {
00014 
00015         SIMOBJECT( AlphaInfiniteSpikeResponse, AdvancePhase::One )
00016 
00017 public:
00018     AlphaInfiniteSpikeResponse(
00019         const float tau=3e-3
00020     ): InfiniteSpikeResponse(), tau(tau)
00021     { /* NOOP */ };
00022 
00023     virtual ~AlphaInfiniteSpikeResponse()
00024     { /* NOOP */ };
00025 
00027 
00029     float tau;
00030 
00031     // Update internal variables
00032     virtual int adjust( double dt );
00033 
00034     // Reset to initial condition.
00035     virtual int reset( double dt );
00036 
00037     virtual int advance(AdvanceInfo const &);
00038 
00039     virtual int spikeHit( spikeport_t port, SpikeEvent const& spike );
00040 
00041 private:
00042 
00043         inline double C1( double const& delta ) {
00044                 return exp( -delta/tau );
00045         };
00046 
00047         inline double C2( double const& delta ) {
00048                 return (delta/tau)*exp( 1.0 - delta/tau );
00049         };
00050 
00052     double c1,c2;
00053 
00055     double x;
00056 };
00057 
00058 #endif /*ALPHAINFINITESPIKERESPONSE_H_*/

Generated on Wed Jul 9 16:34:38 2008 for PCSIM by  doxygen 1.5.5