5 #ifndef BPP_NUMERIC_PARAMETRIZABLE_H 6 #define BPP_NUMERIC_PARAMETRIZABLE_H 10 #include "../Clonable.h" 38 virtual bool hasParameter(
const std::string& name)
const = 0;
129 virtual void setConstraint(
const std::string& name, std::shared_ptr<ConstraintInterface> constraint) = 0;
145 virtual void setNamespace(
const std::string& prefix) = 0;
201 void setConstraint(
const std::string& name, std::shared_ptr<ConstraintInterface> constraint)
override {}
209 #endif // BPP_NUMERIC_PARAMETRIZABLE_H virtual bool matchParametersValues(const ParameterList ¶meters)=0
Update the parameters from parameters.
std::string getNamespace() const override
void setAllParametersValues(const ParameterList ¶meters) override
Set the parameters values to be equals to those of parameters.
virtual ~ParametrizableAdapter()
virtual void setParameterValue(const std::string &name, double value)=0
Set the value of parameter with name name to be equal to value.
ParameterList parameters_
virtual double getParameterValue(const std::string &name) const =0
Get the value for parameter of name 'name'.
virtual std::string getNamespace() const =0
virtual const ParameterList & getParameters() const =0
Get all parameters available.
This class is designed to facilitate the manipulation of parameters.
virtual void setParametersValues(const ParameterList ¶meters)=0
Update the parameters from parameters.
virtual const Parameter & parameter(const std::string &name) const =0
Get the parameter with specified name.
bool hasParameter(const std::string &name) const override
Tell if there is a parameter with specified name.
void setParameterValue(const std::string &name, double value) override
Set the value of parameter with name name to be equal to value.
A low-level implementation of the Parametrizable interface with void functions.
void setParametersValues(const ParameterList ¶meters) override
Update the parameters from parameters.
This is the interface for all objects that imply parameters.
The parameter list object.
bool matchParametersValues(const ParameterList ¶meters) override
Update the parameters from parameters.
virtual bool hasParameter(const std::string &name) const
void setConstraint(const std::string &name, std::shared_ptr< ConstraintInterface > constraint) override
Set/Change the constraint associated with one parameter.
std::string getParameterNameWithoutNamespace(const std::string &name) const override
Resolves a parameter name according to the current namespace.
virtual ParameterList & getParameters_()=0
Get all parameters available.
virtual void setAllParametersValues(const ParameterList ¶meters)=0
Set the parameters values to be equals to those of parameters.
size_t getNumberOfParameters() const override
Get the number of parameters.
const Parameter & parameter(const std::string &name) const override
Get the parameter with specified name.
virtual std::string getParameterNameWithoutNamespace(const std::string &name) const =0
Resolves a parameter name according to the current namespace.
void setNamespace(const std::string &prefix) override
Set the namespace for the parameter names.
The Clonable interface (allow an object to be cloned).
virtual ~Parametrizable()
virtual void setConstraint(const std::string &name, std::shared_ptr< ConstraintInterface > constraint)=0
Set/Change the constraint associated with one parameter.
virtual void setNamespace(const std::string &prefix)=0
Set the namespace for the parameter names.
void removeConstraint(const std::string &name) override
Remove the constraint associated with one parameter, if any.
virtual bool hasParameter(const std::string &name) const =0
Tell if there is a parameter with specified name.
virtual size_t getNumberOfParameters() const =0
Get the number of parameters.
double getParameterValue(const std::string &name) const override
Get the value for parameter of name 'name'.
const ParameterList & getParameters() const override
Get all parameters available.
virtual void removeConstraint(const std::string &name)=0
Remove the constraint associated with one parameter, if any.