21 size_t nbr_samples,
double sigma_factor,
23 :
IParameterized(
"ParameterDistribution"), m_name(par_name), m_nbr_samples(nbr_samples),
24 m_sigma_factor(sigma_factor), m_limits(limits), m_xmin(1.0), m_xmax(-1.0)
29 "ParameterDistribution::ParameterDistribution() -> Error."
30 "sigma factor cannot be negative");
33 "ParameterDistribution::ParameterDistribution() -> Error."
34 "Number of samples can't be zero.");
39 size_t nbr_samples,
double xmin,
double xmax)
40 :
IParameterized(
"ParameterDistribution"), m_name(par_name), m_nbr_samples(nbr_samples),
41 m_sigma_factor(0.0), m_xmin(xmin), m_xmax(xmax)
46 "ParameterDistribution::ParameterDistribution() -> Error."
47 "sigma factor cannot be negative");
49 if (nbr_samples == 0) {
51 "ParameterDistribution::ParameterDistribution() -> Error."
52 "Number of samples can't be zero.");
56 "ParameterDistribution::ParameterDistribution() -> Error."
63 m_nbr_samples(other.m_nbr_samples), m_sigma_factor(other.m_sigma_factor),
64 m_linked_par_names(other.m_linked_par_names), m_limits(other.m_limits), m_xmin(other.m_xmin),
Defines classes representing one-dimensional distributions.
Defines many exception classes in namespace Exceptionss.
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 > mP_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.