PetaVision  Alpha
LIFGap.hpp
1 /*
2  * LIFGap.hpp
3  *
4  * Created on: Jul 29, 2011
5  * Author: garkenyon
6  */
7 
8 #ifndef LIFGAP_HPP_
9 #define LIFGAP_HPP_
10 
11 #include "LIF.hpp"
12 
13 #define NUM_LIFGAP_EVENTS 1 + NUM_LIF_EVENTS // ???
14 //#define EV_LIF_GSYN_GAP NUM_LIF_EVENTS + 1
15 #define EV_LIFGAP_GSYN_GAP 3
16 //#define EV_LIFGAP_ACTIVITY 4
17 
18 namespace PV {
19 
20 class LIFGap : public PV::LIF {
21  public:
22  LIFGap(const char *name, HyPerCol *hc);
23  virtual ~LIFGap();
24 
25  virtual Response::Status updateState(double time, double dt) override;
26 
27  virtual Response::Status readStateFromCheckpoint(Checkpointer *checkpointer) override;
28 
29  const float *getGapStrength() { return gapStrength; }
30 
31  protected:
32  LIFGap();
33  int initialize(const char *name, HyPerCol *hc, const char *kernel_name);
34  virtual void allocateConductances(int num_channels) override;
35  virtual Response::Status registerData(Checkpointer *checkpointer) override;
36  virtual void readGapStrengthFromCheckpoint(Checkpointer *checkpointer);
37 
38  private:
39  int initialize_base();
40  float *gapStrength;
41  bool gapStrengthInitialized;
42  void calcGapStrength();
43 
44 }; // class LIFGap
45 
46 } /* namespace PV */
47 #endif /* LIFGAP_HPP_ */
Definition: LIF.hpp:49