Commit e0877d96 authored by andibraimllari's avatar andibraimllari
Browse files

provide an initial value to the construction of the noise generators

parent 391892a3
Pipeline #720089 passed with stages
in 21 minutes and 25 seconds
......@@ -12,7 +12,8 @@ namespace elsa
DataContainer<data_t> GaussianNoiseGenerator::operator()(const DataContainer<data_t>& dc) const
{
// Define random generator with Gaussian distribution
std::default_random_engine generator;
std::random_device randDevice{};
std::default_random_engine generator{randDevice()};
std::normal_distribution<data_t> dist(_mean, _stddev);
auto newDc = dc;
......@@ -27,7 +28,8 @@ namespace elsa
DataContainer<data_t> PoissonNoiseGenerator::operator()(const DataContainer<data_t>& dc) const
{
// Define random generator with Gaussian distribution
std::default_random_engine generator;
std::random_device randDevice{};
std::default_random_engine generator{randDevice()};
std::exponential_distribution<data_t> dist(_mean);
auto newDc = dc;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment