|
Unfit
3.1.1
Data fitting and optimization software
|
#include <NelderMeadTestFunctions.hpp>
Public Member Functions | |
| std::vector< double > | operator() (const std::vector< double > &x) |
Public Member Functions inherited from Unfit::GenericCostFunction | |
| virtual | ~GenericCostFunction () |
The Sample function 2 is defined as
(y^2 + 4xy +x^3 - 2x).
Number of dimensions = 2 The global minimum is: (2.896805253, -5.793610507) Initial guess: (0, 0.8)
Reference: http://www.wolframalpha.com/input/ ?i=%28y^2+%2B+4xy+%2Bx^3+-+2x%29 We overload the operator as is required in GenericCostFunction to calculate the cost of the function.
Behaviour: cost = y^2 + 4xy +x^3 - 2x
Intended use : SampleCostFunction2 Func; cost = Func(const std::vector<double> x);
NOTE that the returned cost is the sqare root of the evaluation due to the fact the Nelder Mead class will square the cost.
Parameter:
| x | (input) vector containing coordinates of x and y |
(sqrt(y^2 + x^2))
Number of dimensions = 2 The global minimum is: (0, 0) Initial guess: (5, 0)
Reference:
|
inlinevirtual |
We overload the operator as is required in GenericCostFunction to calculate the cost of the function.
Behaviour: cost = sqrt(y^2 + x^2)
Intended use : SampleCostFunction3 Func; cost = Func(const std::vector<double> x);
NOTE that the returned cost is the sqare root of the evaluation due to the fact the Nelder Mead class will square the cost.
Parameters:
| x | (input) vector containing coordinates of x and y |
Implements Unfit::GenericCostFunction.
1.8.13