PetaVision  Alpha
InitOneToOneWeights.hpp
1 /*
2  * InitOneToOneWeights.hpp
3  *
4  * Created on: Sep 28, 2011
5  * Author: kpeterson
6  */
7 
8 #ifndef INITONETOONEWEIGHTS_HPP_
9 #define INITONETOONEWEIGHTS_HPP_
10 
11 #include "InitWeights.hpp"
12 
13 namespace PV {
14 
15 // TODO make InitOneToOneWeights a derived class of InitUniformWeights
17  protected:
18  virtual void ioParam_weightInit(enum ParamsIOFlag ioFlag);
19 
20  public:
21  InitOneToOneWeights(char const *name, HyPerCol *hc);
22  virtual ~InitOneToOneWeights();
23 
24  virtual int ioParamsFillGroup(enum ParamsIOFlag ioFlag) override;
25 
26  virtual void calcWeights(int patchIndex, int arborId) override;
27  void calcOtherParams(int patchIndex);
28 
29  protected:
31  int initialize(char const *name, HyPerCol *hc);
32  int createOneToOneConnection(float *dataStart, int patchIndex, float weightInit);
33 
34  protected:
35  float mWeightInit;
36 }; // class InitOneToOneWeights
37 
38 } /* namespace PV */
39 #endif /* INITONETOONEWEIGHTS_HPP_ */
virtual int ioParamsFillGroup(enum ParamsIOFlag ioFlag) override
virtual void calcWeights()