bpp-core3
3.0.0
|
Wrapper class for optimization under constraints. More...
#include <Bpp/Numeric/Function/Functions.h>
Public Member Functions | |
InfinityFunctionWrapper (std::shared_ptr< FunctionInterface > function) | |
virtual | ~InfinityFunctionWrapper () |
InfinityFunctionWrapper * | clone () const override |
Create a copy of this object and send a pointer to it. More... | |
void | setParameters (const ParameterList ¶meters) override |
Set the point where the function must be computed. More... | |
double | getValue () const override |
Get the value of the function at the current point. More... | |
double | f (const ParameterList ¶meters) override |
Get the value of the function according to a given set of parameters. More... | |
void | setAllParametersValues (const ParameterList ¶meters) override |
Set the parameters values to be equals to those of parameters. More... | |
void | setParameterValue (const std::string &name, double value) override |
Set the value of parameter with name name to be equal to value. More... | |
void | setParametersValues (const ParameterList ¶meters) override |
Update the parameters from parameters. More... | |
bool | matchParametersValues (const ParameterList ¶meters) override |
Update the parameters from parameters. More... | |
bool | hasParameter (const std::string &name) const override |
Tell if there is a parameter with specified name. More... | |
const ParameterList & | getParameters () const override |
Get all parameters available. More... | |
const Parameter & | parameter (const std::string &name) const override |
Get the parameter with specified name. More... | |
double | getParameterValue (const std::string &name) const override |
Get the value for parameter of name 'name'. More... | |
void | removeConstraint (const std::string &name) override |
Remove the constraint associated with one parameter, if any. More... | |
void | setConstraint (const std::string &name, std::shared_ptr< ConstraintInterface > constraint) override |
Set/Change the constraint associated with one parameter. More... | |
size_t | getNumberOfParameters () const override |
Get the number of parameters. More... | |
void | setNamespace (const std::string &prefix) override |
Set the namespace for the parameter names. More... | |
std::string | getNamespace () const override |
std::string | getParameterNameWithoutNamespace (const std::string &name) const override |
Resolves a parameter name according to the current namespace. More... | |
Protected Member Functions | |
ParameterList & | getParameters_ () override |
Get all parameters available. More... | |
Protected Attributes | |
bool | constraintMatch_ |
std::shared_ptr< FunctionInterface > | function_ |
Wrapper class for optimization under constraints.
Catch any ConstraintException thrown and send +inf.
Definition at line 410 of file Functions.h.
|
inline |
Definition at line 417 of file Functions.h.
|
inlinevirtual |
Definition at line 420 of file Functions.h.
|
inlineoverridevirtual |
Create a copy of this object and send a pointer to it.
Implements bpp::Clonable.
Reimplemented in bpp::InfinityDerivableSecondOrderWrapper, and bpp::InfinityDerivableFirstOrderWrapper.
Definition at line 422 of file Functions.h.
|
inlineoverridevirtual |
Get the value of the function according to a given set of parameters.
parameters | The parameter set to pass to the function. |
Exception | If an error occured. |
Reimplemented from bpp::FunctionWrapper.
Definition at line 443 of file Functions.h.
References bpp::FunctionInterface::getValue(), and bpp::FunctionInterface::setParameters().
|
inlineoverridevirtualinherited |
Implements bpp::Parametrizable.
Definition at line 322 of file Functions.h.
|
inlineoverridevirtualinherited |
Get the number of parameters.
Implements bpp::Parametrizable.
Definition at line 312 of file Functions.h.
|
inlineoverridevirtualinherited |
Resolves a parameter name according to the current namespace.
Implements bpp::Parametrizable.
Definition at line 327 of file Functions.h.
|
inlineoverridevirtualinherited |
Get all parameters available.
Implements bpp::Parametrizable.
Definition at line 257 of file Functions.h.
|
inlineoverrideprotectedvirtualinherited |
Get all parameters available.
Implements bpp::Parametrizable.
Definition at line 333 of file Functions.h.
|
inlineoverridevirtualinherited |
Get the value for parameter of name 'name'.
name | The name of the parameter. |
Implements bpp::Parametrizable.
Definition at line 277 of file Functions.h.
|
inlineoverridevirtual |
Get the value of the function at the current point.
Exception | If no point is specified or if an error occured. |
Reimplemented from bpp::FunctionWrapper.
Definition at line 438 of file Functions.h.
|
inlineoverridevirtualinherited |
Tell if there is a parameter with specified name.
name | The name of the parameter to look for. |
Implements bpp::Parametrizable.
Definition at line 247 of file Functions.h.
|
inlineoverridevirtual |
Update the parameters from parameters.
Only common parameters with parameters will be updated.
parameters | A list of parameters. |
ConstraintException | If a value in parameters does not match the constraint in the corresponding parameter in the list. |
Reimplemented from bpp::FunctionWrapper.
Definition at line 488 of file Functions.h.
|
inlineoverridevirtualinherited |
Get the parameter with specified name.
name | The name of the parameter to look for. |
ParameterNotFoundException | if no parameter with this name is found. |
Implements bpp::Parametrizable.
Definition at line 262 of file Functions.h.
|
inlineoverridevirtualinherited |
Remove the constraint associated with one parameter, if any.
name | The name of the parameter to look for. |
ParameterNotFoundException | if no parameter with this name is found. |
Implements bpp::Parametrizable.
Definition at line 302 of file Functions.h.
|
inlineoverridevirtual |
Set the parameters values to be equals to those of parameters.
The list must contain exactly the same parameters (ie same names) than the parameters available.
parameters | A list with all parameters. |
ParameterNotFoundException | If a some parameter in the list is not in params. |
ConstraintException | If a value in parameters does not match the constraint in the corresponding parameter in the list. |
Reimplemented from bpp::FunctionWrapper.
Definition at line 449 of file Functions.h.
|
inlineoverridevirtualinherited |
Set/Change the constraint associated with one parameter.
name | The name of the parameter to look for. |
constraint | A pointer to the constraint (may be null) |
ParameterNotFoundException | if no parameter with this name is found. |
Implements bpp::Parametrizable.
Definition at line 307 of file Functions.h.
|
inlineoverridevirtualinherited |
Set the namespace for the parameter names.
prefix | The 'namespace', that is a prefix to add to all parameter names. If parameter names are already prefixed, the new prefix will be used instead. |
Implements bpp::Parametrizable.
Definition at line 317 of file Functions.h.
|
inlineoverridevirtual |
Set the point where the function must be computed.
parameters | The parameter set to pass to the function. |
Reimplemented from bpp::FunctionWrapper.
Definition at line 425 of file Functions.h.
|
inlineoverridevirtual |
Update the parameters from parameters.
parameters must be a subset of all parameters available.
parameters | A list containing all parameters to update. |
ParameterNotFoundException | If a some parameter in params is not in the list. |
ConstraintException | If a value in parameters does not match the constraint in the corresponding parameter in the list. |
Reimplemented from bpp::FunctionWrapper.
Definition at line 475 of file Functions.h.
|
inlineoverridevirtual |
Set the value of parameter with name name to be equal to value.
name | the name of the parameter to set. |
value | The value of the parameter. |
ParameterNotFoundException | If no parameter in the list has the name name. |
ConstraintException | If value does not match the constraint associated to parameter name. |
Reimplemented from bpp::FunctionWrapper.
Definition at line 462 of file Functions.h.
|
mutableprotected |
Definition at line 414 of file Functions.h.
|
protectedinherited |
Definition at line 235 of file Functions.h.
Referenced by bpp::FunctionWrapper::operator=().