Wrapper to allow access by name into list of BCParameter. More...
#include <BCParameterSet.h>
Public Member Functions | |
virtual bool | ApplyFixedValues (std::vector< double > &x) const |
Change values to fixed values for fixed parameters. More... | |
virtual bool | ArePriorsSet (bool ignore_fixed=true) const |
Check whether all parameters have factorized priors set. More... | |
BCParameterSet () | |
Constructor. | |
virtual std::vector< double > | GetFixedValues (bool include_unfixed=true) const |
Get vector of fixed values. More... | |
virtual double | GetLogPrior (const std::vector< double > ¶meters) const |
Get log of prior; assumes independent priors given for all parameters in set. More... | |
virtual unsigned int | GetNFixedParameters () const |
virtual unsigned int | GetNFreeParameters () const |
virtual std::vector< double > | GetRandomValuesAccordingToPriors (TRandom *const R) const |
Get vector values distributed randomly by the parameter priors. More... | |
virtual std::vector< double > | GetRangeCenters () const |
Get range centers, leaving fixed parameters at fixed values. More... | |
virtual std::vector< double > | GetUniformRandomValues (TRandom *const R) const |
Get vector of values uniformly distributed in parameter ranges (or at fixed values, if fixed) More... | |
virtual bool | IsAtFixedValues (const std::vector< double > &x) const |
Check if fixed parameters in vector of values are at fixed values. More... | |
virtual bool | IsWithinLimits (const std::vector< double > &x) const |
Check if vector of values is within limits. More... | |
virtual void | SetPriorConstantAll () |
Set all priors to constant. More... | |
virtual void | ValueFromPositionInRange (std::vector< double > &p) const |
Translate from unit interval to values in variable ranges, fixing fixed parameters along the way. More... | |
virtual double | Volume () const |
virtual | ~BCParameterSet () |
Destructor. | |
Public Member Functions inherited from BCVariableSet< BCParameter > | |
virtual bool | Add (const BCParameter &var) |
Add a variable if no variable of same name exists yet. More... | |
virtual bool | Add (const std::string &name, double min, double max, const std::string &latexname="", const std::string &unitstring="") |
Add a variable. More... | |
virtual BCParameter & | At (unsigned index) |
Safe access, but slightly less efficient access to parameter. More... | |
virtual const BCParameter & | At (unsigned index) const |
Safe access, but slightly less efficient access to parameter. More... | |
virtual BCParameter & | Back () |
Access to last pushed variable. More... | |
virtual const BCParameter & | Back () const |
Access to last pushed variable. More... | |
BCVariableSet () | |
Constructor. | |
virtual bool | Empty () const |
Whether container is empty. | |
virtual void | FillH1 (bool flag) |
Set fill-histograms flag for all 1D histograms for all parameters. More... | |
virtual void | FillH2 (bool flag) |
Set fill-histograms flag for all 2D histograms for all parameters. More... | |
virtual void | FillHistograms (bool flag) |
Set fill-histograms flag for 1D and 2D histograms for all parameters. More... | |
virtual void | FillHistograms (bool flag_1d, bool flag_2d) |
Set fill-histograms flag for 1D and 2D histograms for all parameters. More... | |
virtual BCParameter & | Get (const std::string &name) |
Safe access, but slightly less efficient access to parameter. More... | |
virtual const BCParameter & | Get (const std::string &name) const |
Safe access, but slightly less efficient access to parameter. More... | |
virtual unsigned | Index (const std::string &name) const |
Find index of parameter identified by name; return Size() if name not found. More... | |
virtual unsigned | MaxNameLength () const |
virtual BCParameter & | operator[] (unsigned index) |
Raw and fast access. More... | |
virtual const BCParameter & | operator[] (unsigned index) const |
Raw and fast access. More... | |
virtual std::vector< double > | PositionInRange (const std::vector< double > &x) const |
return positions in ranges of given values from 0 (at lower limit) to 1 (at upper limit) for each variable in the set. More... | |
virtual void | PrintSummary () const |
Print summary of variable set to logs. More... | |
virtual void | SetNBins (unsigned nbins) |
Set number of bins for all parameters. More... | |
virtual void | SetPrecision (unsigned n) |
Set precision for output of all parameters. More... | |
virtual unsigned | Size () const |
Number of variables contained. | |
Additional Inherited Members | |
Protected Attributes inherited from BCVariableSet< BCParameter > | |
unsigned | fMaxNameLength |
Maximum length (in characters) of variable names. More... | |
std::vector< BCParameter > | fVars |
Vector of BCVariables that forms the set. More... | |
Detailed Description
Wrapper to allow access by name into list of BCParameter.
- Note
- Parameters are not owned, and will not be deleted by BCParameterSet.
Definition at line 30 of file BCParameterSet.h.
Member Function Documentation
|
virtual |
Change values to fixed values for fixed parameters.
- Parameters
-
x Vector of parameter values to adjust.
Definition at line 153 of file BCParameterSet.cxx.
|
virtual |
Check whether all parameters have factorized priors set.
- Parameters
-
ignore_fixed Whether to ignore fixed parameters.
- Returns
- Whether all parameters have factorized priors set.
Definition at line 81 of file BCParameterSet.cxx.
|
virtual |
Get vector of fixed values.
- Parameters
-
include_unfixed Flag for whether to return fixed values (true) or infinity (false) for unfixed parameters.
- Returns
- vector of fixed values for all parameters.
Definition at line 71 of file BCParameterSet.cxx.
|
virtual |
Get log of prior; assumes independent priors given for all parameters in set.
- Parameters
-
parameters vector of parameters to return prior at.
- Returns
- log of prior at parameter set value.
Definition at line 55 of file BCParameterSet.cxx.
|
virtual |
- Returns
- The number of fixed parameters.
Definition at line 23 of file BCParameterSet.cxx.
|
inlinevirtual |
- Returns
- The number of free parameters.
Definition at line 48 of file BCParameterSet.h.
|
virtual |
Get vector values distributed randomly by the parameter priors.
Parameters with unset priors will have infinite values. Fixed parameters will be at fixed values. One should first call BCParameterSet::ArePriorsSet to be safe.
- Parameters
-
R Random number generator to use.
- Returns
- vector of random values distributed according to priors.
Definition at line 144 of file BCParameterSet.cxx.
|
virtual |
Get range centers, leaving fixed parameters at fixed values.
- Returns
- vector of range centers & fixed values.
Reimplemented from BCVariableSet< BCParameter >.
Definition at line 126 of file BCParameterSet.cxx.
|
virtual |
Get vector of values uniformly distributed in parameter ranges (or at fixed values, if fixed)
- Returns
- vector of uniformly distributed random values.
Reimplemented from BCVariableSet< BCParameter >.
Definition at line 135 of file BCParameterSet.cxx.
|
virtual |
Check if fixed parameters in vector of values are at fixed values.
- Parameters
-
x Values to check.
- Returns
- Whether values are at fixed values.
Definition at line 106 of file BCParameterSet.cxx.
|
virtual |
Check if vector of values is within limits.
Check if fixed parameters are at fixed values.
- Parameters
-
x Values to check
- Returns
- Whether values are within limits of variables.
Reimplemented from BCVariableSet< BCParameter >.
Definition at line 92 of file BCParameterSet.cxx.
|
virtual |
Set all priors to constant.
Definition at line 48 of file BCParameterSet.cxx.
|
virtual |
Translate from unit interval to values in variable ranges, fixing fixed parameters along the way.
- Parameters
-
p vector of positions in the unit interval (0 = lower limit, 1 = upper limit).
Reimplemented from BCVariableSet< BCParameter >.
Definition at line 117 of file BCParameterSet.cxx.
|
virtual |
- Returns
- volume of the set.
Reimplemented from BCVariableSet< BCParameter >.
Definition at line 33 of file BCParameterSet.cxx.
The documentation for this class was generated from the following files:
- /root/bat/BAT/BCParameterSet.h
- /root/bat/src/BCParameterSet.cxx