Skip to content
Snippets Groups Projects
Commit 929a160e authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

rm fct arg

parent 7d8b9d52
No related branches found
No related tags found
1 merge request!1303simplifications of resolution handling; resolve warnings
Pipeline #86766 passed
This commit is part of merge request !1303. Comments created here will be created in the context of that merge request.
......@@ -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);
}
......
......@@ -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;
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment