PetaVision  Alpha
BaseWeightUpdater.hpp
1 /*
2  * BaseWeightUpdater.hpp
3  *
4  * Created on: Nov 29, 2017
5  * Author: Pete Schultz
6  */
7 
8 #ifndef BASEWEIGHTUPDATER_HPP_
9 #define BASEWEIGHTUPDATER_HPP_
10 
11 #include "columns/BaseObject.hpp"
12 #include "components/ArborList.hpp"
13 #include "components/ConnectionData.hpp"
14 
15 namespace PV {
16 
17 class BaseWeightUpdater : public BaseObject {
18  protected:
28  virtual void ioParam_plasticityFlag(enum ParamsIOFlag ioFlag); // end of BaseWeightUpdater parameters
30 
31  public:
32  BaseWeightUpdater(char const *name, HyPerCol *hc);
33 
34  virtual ~BaseWeightUpdater() {}
35 
36  virtual void updateState(double timestamp, double dt) {}
37 
38  bool getPlasticityFlag() const { return mPlasticityFlag; };
39 
40  protected:
42 
43  int initialize(char const *name, HyPerCol *hc);
44 
45  virtual void setObjectType() override;
46 
47  int ioParamsFillGroup(enum ParamsIOFlag ioFlag) override;
48 
49  protected:
50  bool mPlasticityFlag = true;
51 
52  ConnectionData *mConnectionData = nullptr;
53  ArborList *mArborList = nullptr;
54 };
55 
56 } // namespace PV
57 
58 #endif // BASEWEIGHTUPDATER_HPP_
int ioParamsFillGroup(enum ParamsIOFlag ioFlag) override
virtual void ioParam_plasticityFlag(enum ParamsIOFlag ioFlag)
plasticityFlag: Specifies if the weights will update