|
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 () |
This file contains a list of functions that was used to unit-test the Nelder Mead method. These are normal functions, without any data.
Often, the calculated cost is simply the squre root of a function. This is because the Nelder Mead method calculates the cost by doing a sum of squared resisuals.
Here is an index of the functions you may find here:
LineToInfinity InfinityInBetween Infinity2D SampleFunction1 SampleFunction2 (unused and commented out) SampleFunction3 SampleFunction4 (unused and commented out) SampleFunction5 SampleFunction6 SampleFunction7 SampleFunction8 SampleFunction9 Asymptote2D FailFindMin FailFindMin2 PowellSingular AlwaysInfinite This function is a simple line for x > 3, infinity otherwise. It is used to unit-test the case of expansion to infinity
|
inlinevirtual |
We overload the operator as is required in GenericCostFunction to calculate the cost of the function.
Behaviour: cost = abs(x) if x> 3, infinity otherwise
Intended use : LineToInfinity 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 (1D) |
Implements Unfit::GenericCostFunction.
1.8.13