15 #ifndef BORNAGAIN_PARAM_BASE_PARAMETERPOOL_H
16 #define BORNAGAIN_PARAM_BASE_PARAMETERPOOL_H
75 virtual void print(std::ostream& ostr)
const;
79 std::string message = {})
const;
Defines and implements the standard mix-in ICloneable.
Interface for polymorphic classes that should not be copied, except by explicit cloning.
Container with parameters for IParametricComponent object.
std::vector< RealParameter * > m_params
virtual void print(std::ostream &ostr) const
RealParameter * parameter(const std::string &name)
Returns parameter with given name.
void report_set_value_error(const std::string &parname, double value, std::string message={}) const
Reports error while setting parname to given value.
void report_find_matched_parameters_error(const std::string &pattern) const
reports error while finding parameters matching given name.
const std::vector< RealParameter * > parameters() const
Returns full vector of parameters.
RealParameter & addParameter(RealParameter *newPar)
Adds parameter to the pool, and returns reference to the input pointer.
void setUniqueMatchValue(const std::string &pattern, double value)
Sets value of the one parameter that matches pattern ('*' allowed), or throws.
void copyToExternalPool(const std::string &prefix, ParameterPool *other_pool) const
Copies parameters of given pool to other pool, prepeding prefix to the parameter names.
void clear()
Clears the parameter map.
std::vector< std::string > parameterNames() const
ParameterPool * clone() const
Returns a literal clone.
int setMatchedParametersValue(const std::string &wildcards, double value)
Sets value of the nonzero parameters that match pattern ('*' allowed), or throws.
size_t size() const
Returns number of parameters in the pool.
RealParameter * operator[](size_t index)
ParameterPool()
Constructs an empty parameter pool.
void setParameterValue(const std::string &name, double value)
Sets parameter value.
void removeParameter(const std::string &name)
Removes parameter with given name from the pool.
std::vector< RealParameter * > getMatchedParameters(const std::string &pattern) const
Returns nonempty vector of parameters that match the pattern ('*' allowed), or throws.
size_t check_index(size_t index) const
RealParameter * getUniqueMatch(const std::string &pattern) const
Returns the one parameter that matches the pattern (wildcards '*' allowed), or throws.
friend std::ostream & operator<<(std::ostream &ostr, const ParameterPool &obj)
Limits for a real fit parameter.
Wraps a parameter of type double.
QString const & name(EShape k)