PetaVision  Alpha
BackgroundLayer.hpp
1 /*
2  * BackgroundLayer.hpp
3  * Background layer clones a layer, adds 1 more feature in the 0 feature idx, and sets the activity
4  * to the NOR of everything of that feature (none of the above category)
5  *
6  * Created on: 4/16/15
7  * slundquist
8  */
9 
10 #ifndef BACKGROUNDLAYER_HPP_
11 #define BACKGROUNDLAYER_HPP_
12 
13 #include "CloneVLayer.hpp"
14 
15 namespace PV {
16 
17 // CloneLayer can be used to implement Sigmoid junctions between spiking neurons
18 class BackgroundLayer : public CloneVLayer {
19  public:
20  BackgroundLayer(const char *name, HyPerCol *hc);
21  virtual ~BackgroundLayer();
22  virtual Response::Status
23  communicateInitInfo(std::shared_ptr<CommunicateInitInfoMessage const> message) override;
24  virtual void allocateV() override;
25  virtual Response::Status updateState(double timef, double dt) override;
26  virtual int setActivity() override;
27 
28  protected:
30  int initialize(const char *name, HyPerCol *hc);
31  int ioParamsFillGroup(enum ParamsIOFlag ioFlag) override;
32  void ioParam_repFeatureNum(enum ParamsIOFlag ioFlag);
33 
34  private:
35  int initialize_base();
36  int repFeatureNum;
37 }; // class BackgroundLayer
38 
39 } // namespace PV
40 
41 #endif /* CLONELAYER_HPP_ */
int ioParamsFillGroup(enum ParamsIOFlag ioFlag) override