rational_fitter.h 1.2 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12
#pragma once

// Include STL
#include <vector>
#include <string>

// Interface
#include <QObject>
#include <core/function.h>
#include <core/data.h>
#include <core/fitter.h>
#include <core/args.h>
13 14
#include <core/rational_function.h>
#include <core/vertical_segment.h>
15 16


17
class rational_fitter_quadproge : public QObject, public fitter
18 19 20 21 22 23
{
	Q_OBJECT
	Q_INTERFACES(fitter)

	public: // methods
	
24 25
		rational_fitter_quadproge() ;
		virtual ~rational_fitter_quadproge() ;
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43

		// Fitting a data object
		//
		virtual bool fit_data(const data* d, function* fit) ;

		// Provide user parameters to the fitter
		//
		virtual void set_parameters(const arguments& args) ;

		// Obtain associated data and functions
		//
		virtual data*     provide_data() const ;
		virtual function* provide_function() const ;

	protected: // data

		// Fitting a data object using np elements in the numerator and nq 
		// elements in the denominator
44 45
		virtual bool fit_data(const vertical_segment* d, int np, int nq, rational_function* fit) ;
		virtual bool fit_data(const vertical_segment* dat, int np, int nq, int ny, rational_function* fit) ;
46 47 48 49 50 51

		// min and Max usable np and nq values for the fitting
		int _max_np, _max_nq ;
		int _min_np, _min_nq ;
} ;