ODIN
Public Member Functions | List of all members

#include <fitting.h>

Inheritance diagram for FunctionFitDownhillSimplex:
Inheritance graph
[legend]

Public Member Functions

 FunctionFitDownhillSimplex ()
 
 ~FunctionFitDownhillSimplex ()
 
bool init (ModelFunction &model_func, unsigned int nvals)
 
bool fit (const Array< float, 1 > &yvals, const Array< float, 1 > &ysigma=defaultArray, const Array< float, 1 > &xvals=defaultArray, unsigned int max_iterations=DEFAULT_MAX_ITER, double tolerance=DEFAULT_TOLERANCE)
 
unsigned int numof_fitpars () const
 
float evaluate (const fvector &pars) const
 

Detailed Description

Class for downhill-simplex-based fitting of functions.

Definition at line 503 of file fitting.h.

Constructor & Destructor Documentation

◆ FunctionFitDownhillSimplex()

FunctionFitDownhillSimplex::FunctionFitDownhillSimplex ( )

Constructs uninitialized function fit

◆ ~FunctionFitDownhillSimplex()

FunctionFitDownhillSimplex::~FunctionFitDownhillSimplex ( )

Destructor

Member Function Documentation

◆ evaluate()

float FunctionFitDownhillSimplex::evaluate ( const fvector ) const
virtual

Multi-dimensional function to be minimized

Implements MinimizationFunction.

◆ fit()

bool FunctionFitDownhillSimplex::fit ( const Array< float, 1 > &  yvals,
const Array< float, 1 > &  ysigma = defaultArray,
const Array< float, 1 > &  xvals = defaultArray,
unsigned int  max_iterations = DEFAULT_MAX_ITER,
double  tolerance = DEFAULT_TOLERANCE 
)
virtual

The fitting routine that takes the starting values from the model function, y-values 'yvals', and optionally the corresponding y-error bars 'ysigma' and x-vals 'xvals'. If no error-bars are given, they are all set to 0.1 and if no x-vals are given equidistant points with an increment of one are chosen, i.e. xvals(i)=i; A maximum of 'max_iterations' iterations and the given 'tolerance' is used during the fit. Returns true on success.

Implements FunctionFitInterface.

◆ init()

bool FunctionFitDownhillSimplex::init ( ModelFunction model_func,
unsigned int  nvals 
)
virtual

Prepare a non-linear least-square fit of function 'model_func' for 'nvals' values

Implements FunctionFitInterface.

◆ numof_fitpars()

unsigned int FunctionFitDownhillSimplex::numof_fitpars ( ) const
virtual

Returns the number of independent fitting parameters

Implements MinimizationFunction.


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