rational_fitter_cgal.h 1.17 KB
Newer Older
1 2 3 4 5 6 7 8
#pragma once

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

// Interface
#include <core/function.h>
9
#include <core/rational_function.h>
10
#include <core/data.h>
11
#include <core/vertical_segment.h>
12 13
#include <core/fitter.h>
#include <core/args.h>
14
#include <core/ptr.h>
15

Laurent Belcour's avatar
Laurent Belcour committed
16 17 18
/*! \brief A vertical segment fitter for rational function using the library CGAL
 *  \ingroup plugins
 */
19
class rational_fitter_cgal : public fitter
20 21
{
	public: // methods
22 23 24
	
		rational_fitter_cgal() ;
		virtual ~rational_fitter_cgal() ;
25 26

		// Fitting a data object
27
		//
28
        virtual bool fit_data(const ptr<data>& d, ptr<function>& fit, const arguments& args) ;
29

30 31
		// Provide user parameters to the fitter
		//
32 33 34 35
		virtual void set_parameters(const arguments& args) ;

	protected: // data

36 37
		// Fitting a data object using np elements in the numerator and nq 
		// elements in the denominator
38
		virtual bool fit_data(const ptr<vertical_segment>& d, int np, int nq, const ptr<rational_function>& fit) ;
39
        virtual bool fit_data(const ptr<vertical_segment>& dat, int np, int nq, int ny, rational_function_1d* fit) ;
40

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