43 #include "../ParameterList.h" 44 #include "../Parametrizable.h" 45 #include "../AbstractParametrizable.h" 46 #include "../ParameterExceptions.h" 49 #include "../../Clonable.h" 50 #include "../../Exceptions.h" 136 #if defined(NO_VIRTUAL_COV) 196 #if defined(NO_VIRTUAL_COV) 451 #if defined(NO_VIRTUAL_COV) 556 #if defined(NO_VIRTUAL_COV) 590 #if defined(NO_VIRTUAL_COV) 658 #endif //_FUNCTIONS_H_ bool enableFirstOrderDerivatives() const
Tell if derivatives must be computed.
bool enableSecondOrderDerivatives() const
Tell if derivatives must be computed.
virtual bool matchParametersValues(const ParameterList ¶meters)=0
Update the parameters from parameters.
Exception thrown when a parameter is not found, for instance in a ParameterList.
Wrapper class for optimization under constraints.
virtual ~DerivableSecondOrder()
void fireParameterChanged(const ParameterList ¶meters)
Notify the class when one or several parameters have changed.
double d2f(const std::string &variable, const ParameterList ¶meters)
size_t getNumberOfParameters() const
Get the number of parameters.
FunctionWrapper(Function *function)
virtual void setParameters(const ParameterList ¶meters)=0
Set the point where the function must be computed.
virtual double f(const ParameterList ¶meters)
Get the value of the function according to a given set of parameters.
void setParameterValue(const std::string &name, double value)
Set the value of parameter with name name to be equal to value.
void setAllParametersValues(const ParameterList ¶meters)
Set the parameters values to be equals to those of parameters.
InfinityDerivableFirstOrderWrapper(DerivableFirstOrder *function)
virtual void setParameterValue(const std::string &name, double value)=0
Set the value of parameter with name name to be equal to value.
This class allows to perform a correspondence analysis.
double getFirstOrderDerivative(const std::string &variable) const
Get the derivative of the function at the current point.
virtual double getParameterValue(const std::string &name) const =0
Get the value for parameter of name 'name'.
A partial implementation of the Parametrizable interface.
double getSecondOrderDerivative(const std::string &variable1, const std::string &variable2) const
This is the function abstract class.
void setParameters(const ParameterList ¶meters)
Set the point where the function must be computed.
std::string getNamespace() const
virtual std::string getNamespace() const =0
double getValue() const
Get the value of the function at the current point.
virtual const ParameterList & getParameters() const =0
Get all parameters available.
General class that wraps a function into another one. This class is meant to be derivated and just pr...
Wrapper class for optimization under constraints.
This class is designed to facilitate the manipulation of parameters.
Clonable * clone() const
Create a copy of this object and send a pointer to it.
virtual void setParametersValues(const ParameterList ¶meters)=0
Update the parameters from parameters.
virtual bool enableSecondOrderDerivatives() const =0
Tell if derivatives must be computed.
double getFirstOrderDerivative(const std::string &variable) const
virtual ~InfinityDerivableSecondOrderWrapper()
virtual bool enableFirstOrderDerivatives() const =0
Tell if derivatives must be computed.
void setNamespace(const std::string &prefix)
Set the namespace for the parameter names.
virtual double getSecondOrderDerivative(const std::string &variable) const =0
Get the second order derivative of the function at the current point.
This is the interface for all objects that imply parameters.
virtual double getFirstOrderDerivative(const std::string &variable) const =0
Get the derivative of the function at the current point.
The parameter list object.
DerivableSecondOrderWrapper(DerivableSecondOrder *function)
void setParametersValues(const ParameterList ¶meters)
Update the parameters from parameters.
DerivableFirstOrderWrapper(DerivableFirstOrder *function)
bool matchParametersValues(const ParameterList ¶meters)
Update the parameters from parameters.
FunctionWrapper(const FunctionWrapper &fw)
std::string getParameterNameWithoutNamespace(const std::string &name) const
Resolves a parameter name according to the current namespace.
DerivableSecondOrder * clone() const =0
Create a copy of this object and send a pointer to it.
void setParametersValues(const ParameterList ¶meters)
Update the parameters from parameters.
Wrapper class for optimization under constraints.
virtual double d2f(const std::string &variable1, const std::string &variable2, const ParameterList ¶meters)
Get the value of the cross derivative of the function according to a given set of parameters...
virtual void setAllParametersValues(const ParameterList ¶meters)=0
Set the parameters values to be equals to those of parameters.
General class that wraps a function into another one. This class is meant to be derivated and just pr...
double getSecondOrderDerivative(const std::string &variable) const
Get the second order derivative of the function at the current point.
bool matchParametersValues(const ParameterList ¶meters)
Update the parameters from parameters.
TestFunction(double x=0, double y=0)
const Parameter & getParameter(const std::string &name) const
Get the parameter with specified name.
virtual ~InfinityFunctionWrapper()
InfinityFunctionWrapper(Function *function)
double f(const ParameterList ¶meters)
Get the value of the function according to a given set of parameters.
virtual double df(const std::string &variable, const ParameterList ¶meters)
Get the value of the first derivative of the function according to a given set of parameters...
InfinityDerivableSecondOrderWrapper(DerivableFirstOrder *function)
DerivableFirstOrder * clone() const =0
Create a copy of this object and send a pointer to it.
double f(const ParameterList ¶meters)
Get the value of the function according to a given set of parameters.
void setParameterValue(const std::string &name, double value)
Set the value of parameter with name name to be equal to value.
void addParameter_(Parameter *parameter)
virtual std::string getParameterNameWithoutNamespace(const std::string &name) const =0
Resolves a parameter name according to the current namespace.
virtual double d2f(const std::string &variable, const ParameterList ¶meters)
Get the value of the second order derivative of the function according to a given set of parameters...
virtual ~DerivableFirstOrder()
bool matchParametersValues(const ParameterList ¶meters)
Update the parameters from parameters.
The Clonable interface (allow an object to be cloned).
A simple funciton with two parameters, mostly for testing and debugging :)
This is the abstract class for second order derivable functions.
const ParameterList & getParameters() const
Get all parameters available.
double getParameterValue(const std::string &name) const
Get the value for parameter of name 'name'.
bool hasParameter(const std::string &name) const
Tell if there is a parameter with specified name.
InfinityDerivableFirstOrderWrapper * clone() const
Create a copy of this object and send a pointer to it.
This is the abstract class for first order derivable functions.
virtual double getValue() const
Get the value of this parameter.
InfinityDerivableSecondOrderWrapper * clone() const
Create a copy of this object and send a pointer to it.
virtual const Parameter & getParameter(const std::string &name) const =0
Get the parameter with specified name.
void setParameters(const ParameterList ¶meters)
Set the point where the function must be computed.
Exception thrown when a value do not match a given constraint.
virtual void setNamespace(const std::string &prefix)=0
Set the namespace for the parameter names.
double getSecondOrderDerivative(const std::string &variable) const
virtual bool hasParameter(const std::string &name) const =0
Tell if there is a parameter with specified name.
virtual ~InfinityDerivableFirstOrderWrapper()
double d2f(const std::string &variable1, const std::string &variable2, const ParameterList ¶meters)
FunctionWrapper & operator=(const FunctionWrapper &fw)
double getValue() const
Get the value of the function at the current point.
double df(const std::string &variable, const ParameterList ¶meters)
virtual size_t getNumberOfParameters() const =0
Get the number of parameters.
void enableSecondOrderDerivatives(bool yn)
Tell if derivatives must be computed.
void setAllParametersValues(const ParameterList ¶meters)
Set the parameters values to be equals to those of parameters.
void setParameters(const ParameterList ¶meters)
Set the point where the function must be computed.
void enableFirstOrderDerivatives(bool yn)
Tell if derivatives must be computed.
General class that wraps a function into another one. This class is meant to be derivated and just pr...
double getValue() const
Get the value of the function at the current point.
const Parameter & getParameter(const std::string &name) const
Get the parameter with specified name.
virtual double getValue() const =0
Get the value of the function at the current point.
double getSecondOrderDerivative(const std::string &variable1, const std::string &variable2) const
Get the value of the cross derivative of the function according to a given set of parameters...
InfinityFunctionWrapper * clone() const
Create a copy of this object and send a pointer to it.