Unfit  3.1.1
Data fitting and optimization software
Public Member Functions | List of all members
Unfit::UnitTests::FailFindMin Class Reference

#include <NelderMeadTestFunctions.hpp>

Inheritance diagram for Unfit::UnitTests::FailFindMin:
Unfit::GenericCostFunction

Public Member Functions

std::vector< double > operator() (const std::vector< double > &x)
 
- Public Member Functions inherited from Unfit::GenericCostFunction
virtual ~GenericCostFunction ()
 

Detailed Description

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

Member Function Documentation

◆ operator()()

std::vector<double> Unfit::UnitTests::FailFindMin::operator() ( const std::vector< double > &  x)
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:

Parameters
x(input) vector containing values of the 3 variables
Returns
cost

Implements Unfit::GenericCostFunction.


The documentation for this class was generated from the following file: