Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
IP
elsa
Commits
e0877d96
Commit
e0877d96
authored
Oct 23, 2021
by
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
Changes
1
Pipelines
4
Hide whitespace changes
Inline
Side-by-side
elsa/generators/NoiseGenerators.cpp
View file @
e0877d96
...
...
@@ -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
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment