PetaVision  Alpha
GaussianRandomV.hpp
1 /*
2  * GaussianRandomV.hpp
3  *
4  * Created on: Oct 26, 2016
5  * Author: pschultz
6  */
7 
8 #ifndef GAUSSIANRANDOMV_HPP_
9 #define GAUSSIANRANDOMV_HPP_
10 
11 #include "BaseInitV.hpp"
12 
13 namespace PV {
14 
15 class GaussianRandomV : public BaseInitV {
16  protected:
26  virtual void ioParam_meanV(enum ParamsIOFlag ioFlag);
27 
31  virtual void ioParam_sigmaV(enum ParamsIOFlag ioFlag);
33  public:
34  GaussianRandomV(char const *name, HyPerCol *hc);
35  virtual ~GaussianRandomV();
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  float meanV = (float)0;
46  float sigmaV = (float)1;
47 
48 }; // end class GaussianRandomV
49 
50 } // end namespace PV
51 
52 #endif /* GAUSSIANRANDOMV_HPP_ */
virtual void ioParam_sigmaV(enum ParamsIOFlag ioFlag)
sigmaV: The standard deviation of the random distribution
virtual void ioParam_meanV(enum ParamsIOFlag ioFlag)
meanV: The mean of the random distribution
virtual int ioParamsFillGroup(enum ParamsIOFlag ioFlag) override