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

#include <Himmelblau.hpp>

Inheritance diagram for Unfit::Examples::Himmelblau:
Unfit::GenericCostFunction

Public Member Functions

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

Detailed Description

The Himmelblau Function is defined as (x^2 + y -11)^2 + (x + y^2 - 7)^2

Number of dimensions = 2

The global minimum is: 0 at (3, 2), (-2.805118, 3.131312), (-3.779310, -3.283186) and (3.584428, -1.848126)T Initial guess: (4, 2), (-4, 2), (-4, -2), (4, -2)

Member Function Documentation

◆ operator()()

std::vector<double> Unfit::Examples::Himmelblau::operator() ( const std::vector< double > &  variable)
inlinevirtual

We overload the operator as required in GenericCostFunction to calculate the difference between each experimental value and its corresponding value predicted by the model equation i.e. residual

Intended use : residuals = cost_func(const std::vector<double> &param);

Parameters
variablevector containing the current estimates of the variables
Returns
result vector containing the residuals

Implements Unfit::GenericCostFunction.


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