|
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 1 is defined as
(x^2 - 4x + y^2 - y - xy).
Number of dimensions = 2 The global minimum is: (3, 2) Initial guess: (0, 0.8)
Reference : https://docs.google.com/viewer?a=v&q=cache:qDWbSzyjw98J:math. fullerton.edu/mathews/n2003/neldermead/NelderMeadProof.pdf+&hl=en&gl=sg&pid= bl&srcid=ADGEESgadIne-2Pom8fA4eyCi-wrcuSOu4Qytf8KctcUBggvGpahFMKcco7UhNUCS -1ie2ChoM3OjO5RSgp05mrK3lBtbsXQFQFrMP426SOH8BGxZO4YcdbRBXsGn4HsyO02eKFIgWIr &sig=AHIEtbR1PU77goer0s2S6zH7HKthD0USmQ
|
inlinevirtual |
We overload the operator as is required in GenericCostFunction to calculate the cost of the function.
Behaviour: cost = x^2 - 4x + y^2 - y - xy
Intended use : SampleCostFunction1 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