FunctionFit Class Reference
[Classes of the ODIN data processing framework (odindata library)]

#include <fitting.h>

List of all members.

Public Member Functions

 FunctionFit (ModelFunction &model_func, unsigned int nvals, unsigned int max_iterations=500, double tolerance=1.0e-4)
 ~FunctionFit ()
bool fit (const Array< float, 1 > &yvals, const Array< float, 1 > &ysigma=defaultArray, const Array< float, 1 > &xvals=defaultArray)


Detailed Description

Class which is used for fitting of functions.

Definition at line 131 of file fitting.h.


Constructor & Destructor Documentation

FunctionFit::FunctionFit ( ModelFunction model_func,
unsigned int  nvals,
unsigned int  max_iterations = 500,
double  tolerance = 1.0e-4 
)

Prepare a non-linear least-square fit of function 'model_func' for 'nvals' values with a maximum of 'max_iterations' iterations and the given 'tolerance'.

FunctionFit::~FunctionFit (  ) 

Destructor


Member Function Documentation

bool FunctionFit::fit ( const Array< float, 1 > &  yvals,
const Array< float, 1 > &  ysigma = defaultArray,
const Array< float, 1 > &  xvals = defaultArray 
)

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; Returns true on success.


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

Generated on Wed Sep 30 15:33:05 2009 by  doxygen 1.5.6