BornAgain
1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Public Member Functions | |
RangedDistributionLorentz () | |
RangedDistributionLorentz (size_t n_samples, double hwhm_factor, const RealLimits &limits=RealLimits::limitless()) | |
RangedDistributionLorentz (size_t n_samples, double hwhm_factor, double min, double max) | |
RangedDistributionLorentz * | clone () const override |
~RangedDistributionLorentz () override=default | |
std::vector< ParameterSample > | generateSamples (double mean, double stddev) const |
std::vector< std::vector< ParameterSample > > | generateSamples (const std::vector< double > &mean, const std::vector< double > &stddev) const |
std::unique_ptr< IDistribution1D > | distribution (double mean, double stddev) const |
RealLimits | limits () const |
double | sigmaFactor () const |
size_t | nSamples () const |
void | setLimits (const RealLimits &limits) |
std::string | pyString () const |
virtual void | transferToCPP () |
Protected Member Functions | |
std::string | name () const override |
std::unique_ptr< IDistribution1D > | distribution_impl (double median, double hwhm) const override |
Private Member Functions | |
void | checkInitialization () |
Private Attributes | |
size_t | m_n_samples |
double | m_sigma_factor |
RealLimits | m_limits |
Lorentz distribution with median and hwhm.
Definition at line 123 of file RangedDistributions.h.
RangedDistributionLorentz::RangedDistributionLorentz | ( | ) |
Definition at line 150 of file RangedDistributions.cpp.
RangedDistributionLorentz::RangedDistributionLorentz | ( | size_t | n_samples, |
double | hwhm_factor, | ||
const RealLimits & | limits = RealLimits::limitless() |
||
) |
Definition at line 152 of file RangedDistributions.cpp.
RangedDistributionLorentz::RangedDistributionLorentz | ( | size_t | n_samples, |
double | hwhm_factor, | ||
double | min, | ||
double | max | ||
) |
Initializes Ranged distribution with given number of samples, sigma factor (range in standard deviations to take into account during sample generation) and limits (either RealLimits object or just min and max limits).
By default n_samples = 5, hwhm_factor = 2.0, while the limits are (-inf, +inf).
Definition at line 158 of file RangedDistributions.cpp.
|
overridedefault |
|
overridevirtual |
Implements RangedDistribution.
Definition at line 164 of file RangedDistributions.cpp.
References anonymous_namespace{RangedDistributions.cpp}::makeCopy().
|
overrideprotectedvirtual |
Returns distribution name for python-formatted text.
Implements RangedDistribution.
Definition at line 169 of file RangedDistributions.cpp.
|
overrideprotectedvirtual |
Returns underlying IDistribution1D object.
Implements RangedDistribution.
Definition at line 174 of file RangedDistributions.cpp.
|
inherited |
Definition at line 51 of file RangedDistributions.cpp.
References RangedDistribution::distribution(), RangedDistribution::m_limits, RangedDistribution::m_n_samples, RangedDistribution::m_sigma_factor, and ParameterSample::weight.
Referenced by RangedDistribution::generateSamples().
|
inherited |
Generates list of sampled values with their weights from given means and standard deviations.
Definition at line 65 of file RangedDistributions.cpp.
References RangedDistribution::generateSamples().
|
inherited |
Public interface function to underlying IDistribution1D object.
Definition at line 81 of file RangedDistributions.cpp.
References RangedDistribution::distribution_impl().
Referenced by RangedDistribution::generateSamples().
|
inlineinherited |
Returns current limits of the distribution.
Definition at line 63 of file RangedDistributions.h.
References RangedDistribution::m_limits.
Referenced by RangedDistribution::setLimits().
|
inlineinherited |
Returns sigma factor to use during sampling.
Definition at line 65 of file RangedDistributions.h.
References RangedDistribution::m_sigma_factor.
|
inlineinherited |
Returns number of samples to generate.
Definition at line 67 of file RangedDistributions.h.
References RangedDistribution::m_n_samples.
|
inlineinherited |
Definition at line 71 of file RangedDistributions.h.
References RangedDistribution::limits(), and RangedDistribution::m_limits.
|
inherited |
Prints python-formatted definition of the distribution.
Definition at line 89 of file RangedDistributions.cpp.
References pyfmt::indent(), RealLimits::isLimitless(), RangedDistribution::m_limits, RangedDistribution::m_n_samples, RangedDistribution::m_sigma_factor, RangedDistribution::name(), pyfmt::printDouble(), and pyfmt::printRealLimitsArg().
Referenced by operator<<().
|
privateinherited |
Definition at line 100 of file RangedDistributions.cpp.
References RealLimits::hasLowerAndUpperLimits(), RealLimits::lowerLimit(), RangedDistribution::m_limits, RangedDistribution::m_n_samples, RangedDistribution::m_sigma_factor, and RealLimits::upperLimit().
Referenced by RangedDistribution::RangedDistribution().
|
inlinevirtualinherited |
Used for Python overriding of clone (see swig/tweaks.py)
Definition at line 34 of file ICloneable.h.
|
privateinherited |
Definition at line 86 of file RangedDistributions.h.
Referenced by RangedDistribution::checkInitialization(), RangedDistribution::generateSamples(), RangedDistribution::nSamples(), and RangedDistribution::pyString().
|
privateinherited |
Definition at line 87 of file RangedDistributions.h.
Referenced by RangedDistribution::checkInitialization(), RangedDistribution::generateSamples(), RangedDistribution::pyString(), and RangedDistribution::sigmaFactor().
|
privateinherited |
Definition at line 88 of file RangedDistributions.h.
Referenced by RangedDistribution::checkInitialization(), RangedDistribution::generateSamples(), RangedDistribution::limits(), RangedDistribution::pyString(), and RangedDistribution::setLimits().