|
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 Piecewise 2D function is defined as
INF for x<1 and y>1.025 else 5x^2+y^2
Number of dimensions = 2
This function gives a inf value at (x,y) for x<1 and y>1.025
|
inlinevirtual |
We overload the operator as is required in GenericCostFunction to calculate the cost of the 2D piecewise function as defined above.
Behaviour: cost = INF for x<1 and y>1.025 5x^2+y^2 for all values
Intended use : FailFindMin 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 values of the 3 variables |
Implements Unfit::GenericCostFunction.
1.8.13