NNetCpp
Neural network implementation in C++
 All Classes Namespaces Functions Variables
RandomWeightGenerator.h
1 #ifndef RANDOM_WEIGHT_GENERATOR_H
2 #define RANDOM_WEIGHT_GENERATOR_H
3 
4 #include <random>
5 
6 #include "WeightGenerator.h"
7 
12  private:
13  std::default_random_engine engine;
14  std::uniform_real_distribution<double> dist;
15 
16  // Constant default limits
17  constexpr static double DEFAULT_MIN = -1.0;
18  constexpr static double DEFAULT_MAX = 1.0;
19  public:
28  double weightMin = RandomWeightGenerator::DEFAULT_MIN,
29  double weightMax = RandomWeightGenerator::DEFAULT_MAX);
30 
36  double getWeight();
37 };
38 
39 #endif // RANDOM_WEIGHT_GENERATOR_H
double getWeight()
Definition: RandomWeightGenerator.cpp:7
RandomWeightGenerator(double weightMin=RandomWeightGenerator::DEFAULT_MIN, double weightMax=RandomWeightGenerator::DEFAULT_MAX)
Definition: RandomWeightGenerator.cpp:3
Definition: WeightGenerator.h:7
Definition: RandomWeightGenerator.h:11