PetaVision  Alpha
UniformRandomV.hpp
1 /*
2  * UniformRandomV.hpp
3  *
4  * Created on: Oct 26, 2016
5  * Author: pschultz
6  */
7 
8 #ifndef UNIFORMRANDOMV_HPP_
9 #define UNIFORMRANDOMV_HPP_
10 
11 #include "BaseInitV.hpp"
12 
13 namespace PV {
14 
15 class UniformRandomV : public BaseInitV {
16  protected:
26  virtual void ioParam_minV(enum ParamsIOFlag ioFlag);
27 
31  virtual void ioParam_maxV(enum ParamsIOFlag ioFlag);
33  public:
34  UniformRandomV(char const *name, HyPerCol *hc);
35  virtual ~UniformRandomV();
36  virtual int ioParamsFillGroup(enum ParamsIOFlag ioFlag) override;
37  virtual void calcV(float *V, PVLayerLoc const *loc) override;
38 
39  protected:
41  int initialize(char const *name, HyPerCol *hc);
42 
43  private:
44  int initialize_base();
45 
46  // data members
47  private:
48  float minV = (float)0;
49  float maxV = (float)1;
50 
51 }; // end class UniformRandomV
52 
53 } // end namespace PV
54 
55 #endif /* UNIFORMRANDOMV_HPP_ */
virtual void ioParam_minV(enum ParamsIOFlag ioFlag)
minV: The minimum value of the random distribution
virtual int ioParamsFillGroup(enum ParamsIOFlag ioFlag) override
virtual void ioParam_maxV(enum ParamsIOFlag ioFlag)
maxV: The maximum value of the random distribution