FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
SensorNoise.h
1#pragma once
2
11#include <random>
12
39{
40public:
45 explicit SensorNoise(unsigned int seed);
46
48 bool IsDeterministic() const { return m_deterministic; }
49
56 double Uniform(double low, double high);
57
64 double Gaussian(double mean, double stddev);
65
76 int Poisson(double lambda);
77
87 double Gamma(double shape);
88
89private:
91 double RawUniform() { return m_unit(m_engine); }
92
94 double RawStandardNormal();
95
101 double GammaUnitScaleShapeAtLeastOne(double shape);
102
104 static const double kPoissonNormalLimit;
105
106 std::mt19937 m_engine;
107 std::uniform_real_distribution<double> m_unit;
108 bool m_deterministic;
109};
Definition SensorNoise.h:39
double Gamma(double shape)
int Poisson(double lambda)
bool IsDeterministic() const
True when the generator is seeded zero and callers should add no noise.
Definition SensorNoise.h:48
double Uniform(double low, double high)
double Gaussian(double mean, double stddev)
SensorNoise(unsigned int seed)