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

#include <NelderMeadTestFunctions.hpp>

Inheritance diagram for Unfit::UnitTests::SampleCostFunction6:
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

The Sample function 6 is defined as

(v^2 + w^24 + x^2 + y^2 + z^2).

The global minimum is: (0, 0) Initial guess: (0, 0.8)

Number of dimensions = 5

Reference: http://172.18.53.85/trac/attachment/wiki/ SummerOfCode2012/NelderMead2D.pdf

Member Function Documentation

◆ operator()()

std::vector<double> Unfit::UnitTests::SampleCostFunction6::operator() ( const std::vector< double > &  x)
inlinevirtual

We overload the operator as is required in GenericCostFunction to calculate the cost of the function.

Behaviour: cost = v^2 + w^24 + x^2 + y^2 + z^2

Intended use : SampleCostFunction6 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 coordinates of v, w, x, y and z
Returns
cost

Implements Unfit::GenericCostFunction.


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