FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
SensorNoise.h
1#pragma once
2
11#include <random>
12
43{
44public:
49 explicit SensorNoise(unsigned int seed);
50
52 bool IsDeterministic() const { return m_deterministic; }
53
60 double Uniform(double low, double high);
61
68 double Gaussian(double mean, double stddev);
69
80 int Poisson(double lambda);
81
91 double Gamma(double shape);
92
93private:
95 double RawUniform() { return m_unit(m_engine); }
96
98 double RawStandardNormal();
99
105 double GammaUnitScaleShapeAtLeastOne(double shape);
106
108 static const double kPoissonNormalLimit;
109
110 std::mt19937 m_engine;
111 std::uniform_real_distribution<double> m_unit;
112 bool m_deterministic;
113};
Definition SensorNoise.h:43
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:52
double Uniform(double low, double high)
double Gaussian(double mean, double stddev)
SensorNoise(unsigned int seed)