From 929a160e553d95ea76cf53b6abf7127ffa434650 Mon Sep 17 00:00:00 2001 From: "Joachim Wuttke (h)" <j.wuttke@fz-juelich.de> Date: Mon, 23 Jan 2023 12:18:22 +0100 Subject: [PATCH] rm fct arg --- Param/Distrib/RangedDistributions.cpp | 6 +++--- Param/Distrib/RangedDistributions.h | 2 +- Sim/Scan/ScanResolution.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Param/Distrib/RangedDistributions.cpp b/Param/Distrib/RangedDistributions.cpp index 97b669f6956..eaac1fdd5f7 100644 --- a/Param/Distrib/RangedDistributions.cpp +++ b/Param/Distrib/RangedDistributions.cpp @@ -44,13 +44,13 @@ IRangedDistribution::IRangedDistribution(size_t n_samples, double sigma_factor) IRangedDistribution::~IRangedDistribution() = default; -std::vector<ParameterSample> IRangedDistribution::generateSamples(double mean, double stddev) const +std::vector<ParameterSample> IRangedDistribution::generateSamples(double stddev) const { if (stddev == 0) // it's a delta distribution - return {{mean, 1.0}}; + return {{0., 1.0}}; ASSERT(stddev > 0); - auto generator = distribution(mean, stddev); + auto generator = distribution(0., stddev); return generator->equidistantSamples(m_n_samples, m_sigma_factor); } diff --git a/Param/Distrib/RangedDistributions.h b/Param/Distrib/RangedDistributions.h index e47de972d5a..d6852bf6d54 100644 --- a/Param/Distrib/RangedDistributions.h +++ b/Param/Distrib/RangedDistributions.h @@ -41,7 +41,7 @@ public: IRangedDistribution* clone() const override = 0; #ifndef SWIG - std::vector<ParameterSample> generateSamples(double mean, double stddev) const; + std::vector<ParameterSample> generateSamples(double stddev) const; //! Public interface function to underlying IDistribution1D object IDistribution1D* distribution(double mean, double stddev) const; diff --git a/Sim/Scan/ScanResolution.cpp b/Sim/Scan/ScanResolution.cpp index fb1b71158b6..341b04d2907 100644 --- a/Sim/Scan/ScanResolution.cpp +++ b/Sim/Scan/ScanResolution.cpp @@ -32,7 +32,7 @@ ScanResolution* ScanResolution::clone() const std::vector<ParameterSample> ScanResolution::resolutionSamples() const { - return rdistribution()->generateSamples(0., m_stddev); + return rdistribution()->generateSamples(m_stddev); } size_t ScanResolution::nSamples() const -- GitLab