20 size_t nbr_samples,
double sigma_factor,
24 , m_nbr_samples(nbr_samples)
25 , m_sigma_factor(sigma_factor)
32 throw std::runtime_error(
"ParameterDistribution::ParameterDistribution() -> Error."
33 "sigma factor cannot be negative");
35 throw std::runtime_error(
"ParameterDistribution::ParameterDistribution() -> Error."
36 "Number of samples can't be zero.");
41 size_t nbr_samples,
double xmin,
double xmax)
44 , m_nbr_samples(nbr_samples)
51 throw std::runtime_error(
"ParameterDistribution::ParameterDistribution() -> Error."
52 "sigma factor cannot be negative");
54 throw std::runtime_error(
"ParameterDistribution::ParameterDistribution() -> Error."
55 "Number of samples can't be zero.");
57 throw std::runtime_error(
"ParameterDistribution::ParameterDistribution() -> Error."
63 , m_parname(other.m_parname)
64 , m_nbr_samples(other.m_nbr_samples)
65 , m_sigma_factor(other.m_sigma_factor)
66 , m_linked_par_names(other.m_linked_par_names)
67 , m_limits(other.m_limits)
68 , m_xmin(other.m_xmin)
69 , m_xmax(other.m_xmax)
Defines classes representing one-dimensional distributions.
Defines class ParameterDistribution.
Interface for one-dimensional distributions.
virtual IDistribution1D * clone() const =0
Manages a local parameter pool, and a tree of child pools.
A parametric distribution function, for use with any model parameter.
ParameterDistribution & operator=(const ParameterDistribution &other)
Overload assignment operator.
size_t getNbrSamples() const
get number of samples for this distribution
std::unique_ptr< IDistribution1D > m_distribution
const IDistribution1D * getDistribution() const
ParameterDistribution(const std::string &par_name, const IDistribution1D &distribution, size_t nbr_samples, double sigma_factor=0.0, const RealLimits &limits=RealLimits())
ParameterDistribution & linkParameter(std::string par_name)
std::vector< ParameterSample > generateSamples() const
generate list of sampled values with their weight
std::vector< std::string > m_linked_par_names
virtual ~ParameterDistribution()
Limits for a real fit parameter.