AlphaFunctionSpikeResponse.h

Go to the documentation of this file.
00001 #ifndef ALPHAFUNCTIONSPIKERESPONSE_H_
00002 #define ALPHAFUNCTIONSPIKERESPONSE_H_
00003 
00004 #include "FiniteSpikeResponse.h"
00005 
00006 class AlphaFunctionSpikeResponse : public FiniteSpikeResponse
00007 {
00008 
00009         SIMOBJECT( AlphaFunctionSpikeResponse, AdvancePhase::SpikeDriven )
00010 
00011 public:
00012     AlphaFunctionSpikeResponse(
00013         const float tau=3e-3
00014     ): FiniteSpikeResponse(), tau(tau)
00015     { /* NOOP */ };
00016 
00017     virtual ~AlphaFunctionSpikeResponse()
00018     { /* NOOP */ };
00019 
00021 
00023     float tau;
00024 
00025     // Update internal variables
00026     virtual int adjust( double dt );
00027 
00028     // Reset to initial condition.
00029     virtual int reset( double dt );
00030 
00031     virtual int advance(AdvanceInfo const &);
00032 
00033     virtual int spikeHit( spikeport_t port, SpikeEvent const& spike );
00034 
00036 
00039     virtual int psrLength(double dt) const;
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 /*ALPHAFUNCTIONSPIKERESPONSE_H_*/

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