BornAgain  1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
DistributionHandler Class Reference

Provides the functionality to average over parameter distributions with weights. More...

+ Inheritance diagram for DistributionHandler:

Public Types

typedef std::vector< ParameterDistributionDistributions_t
 

Public Member Functions

void addParameterDistribution (const std::string &param_name, const IDistribution1D &distribution, size_t nbr_samples, double sigma_factor=0.0, const RealLimits &limits=RealLimits())
 add a sampled parameter distribution
 
void addParameterDistribution (const ParameterDistribution &par_distr)
 
size_t getTotalNumberOfSamples () const
 get the total number of parameter value combinations (product of the individual sizes of each parameter distribution
 
double setParameterValues (ParameterPool *p_parameter_pool, size_t index)
 set the parameter values of the simulation object to a specific combination of values, determined by the index (which must be smaller than the total number of combinations) and returns the weight associated with this combination of parameter values
 
void setParameterToMeans (ParameterPool *p_parameter_pool) const
 Sets mean distribution values to the parameter pool.
 
const Distributions_t & getDistributions () const
 
- Public Member Functions inherited from IParameterized
 IParameterized (const std::string &name="")
 
 IParameterized (const IParameterized &other)
 
IParameterizedoperator= (const IParameterized &other)=delete
 
ParameterPoolparameterPool () const
 Returns pointer to the parameter pool.
 
virtual ParameterPoolcreateParameterTree () const
 Creates new parameter pool, with all local parameters and those of its children.
 
std::string parametersToString () const
 Returns multiline string representing available parameters.
 
RealParameterregisterParameter (const std::string &name, double *parpointer)
 
void registerVector (const std::string &base_name, kvector_t *p_vec, const std::string &units="nm")
 
void setParameterValue (const std::string &name, double value)
 
void setVectorValue (const std::string &base_name, kvector_t value)
 
RealParameterparameter (const std::string &name) const
 Returns parameter with given 'name'.
 
virtual void onChange ()
 Action to be taken in inherited class when a parameter has changed.
 
void removeParameter (const std::string &name)
 
void removeVector (const std::string &base_name)
 
void setName (const std::string &name)
 
const std::string & getName () const
 

Additional Inherited Members

- Static Public Member Functions inherited from IParameterized
static std::string XComponentName (const std::string &base_name)
 
static std::string YComponentName (const std::string &base_name)
 
static std::string ZComponentName (const std::string &base_name)
 

Detailed Description

Provides the functionality to average over parameter distributions with weights.

Definition at line 24 of file DistributionHandler.h.


The documentation for this class was generated from the following files: