InfiniteSpikeResponse.h

Go to the documentation of this file.
00001 #ifndef INFINITESPIKERESPONSE_H_
00002 #define INFINITESPIKERESPONSE_H_
00003 
00004 #include "SimObject.h"
00005 #include <cmath>
00006 #include <iostream>
00007 using std::cerr;
00008 using std::endl;
00009 
00010 class InfiniteSpikeResponse : public SimObject
00011 {
00012 public:
00013     InfiniteSpikeResponse()
00014     {
00015         psr = 0;        
00016     }
00017 
00018     virtual ~InfiniteSpikeResponse()
00019     { /* NOOP */ }
00020 
00021     // Reset to initial condition.
00022     virtual int reset( double dt )
00023     {
00024         psr = 0;
00025         return 0;
00026     }
00027 
00029     /* Return the number of time steps it will take from the
00030      * time a spike arrives until the postynaptic response has vanished.
00031      */
00032 
00033     double psr;
00034 
00035     virtual double getAnalogOutput(analog_port_id_t p) const
00036     {   
00037         return psr;
00038     };
00039 
00040     virtual int nSpikeInputPorts() const { return 1; };
00041     virtual int nSpikeOutputPorts() const { return 0; };
00042     virtual int nAnalogInputPorts() const { return 0; };
00043     virtual int nAnalogOutputPorts() const { return 1; };
00044     virtual PortType outputPortType(port_t o) const
00045     {
00046         if ( o== 0 ) return analog; else return undefined;
00047     };
00048     virtual PortType inputPortType(port_t i) const
00049     {
00050         if ( i== 0 ) return spiking; else return undefined;
00051     };
00052     
00053     virtual bool isActive()
00054     {
00055         return true;    
00056     }
00057     
00058 
00059 protected:
00060 
00061     inline int spikeHitReturn(AdvanceInfo const &ai)
00062     {
00063         return 0;
00064     }
00065 
00066     inline int advanceReturn(void)
00067     {   
00068         // signal nothing special to the sim engine by returning 0
00069         return 0;
00070     }
00071 
00072 };
00073 
00074 #endif /*INFINITESPIKERESPONSE_H_*/

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