ALTA  alpha
rational_fitter.h
1 /* ALTA --- Analysis of Bidirectional Reflectance Distribution Functions
2 
3  Copyright (C) 2013, 2013, 2014 Inria
4 
5  This file is part of ALTA.
6 
7  This Source Code Form is subject to the terms of the Mozilla Public
8  License, v. 2.0. If a copy of the MPL was not distributed with this
9  file, You can obtain one at http://mozilla.org/MPL/2.0/. */
10 
11 #pragma once
12 
13 // Include STL
14 #include <vector>
15 #include <string>
16 
17 // Interface
18 #include <core/function.h>
19 #include <core/data.h>
20 #include <core/fitter.h>
21 #include <core/args.h>
22 #include <core/rational_function.h>
23 #include <core/vertical_segment.h>
24 
25 using namespace alta;
26 
33 {
34  public: // methods
35 
37  virtual ~rational_fitter_leastsquare() ;
38 
39  // Fitting a data object
40  //
41  virtual bool fit_data(const ptr<data>& d, ptr<function>& fit, const arguments& args) ;
42 
43  // Provide user parameters to the fitter
44  //
45  virtual void set_parameters(const arguments& args) ;
46 
47  protected: // function
48 
49  // Fitting a data object using np elements in the numerator and nq
50  // elements in the denominator
51  virtual bool fit_data(const ptr<vertical_segment>& d, int np, int nq, const ptr<rational_function>& fit) ;
52  virtual bool fit_data(const ptr<vertical_segment>& dat, int np, int nq, int ny, rational_function_1d* fit) ;
53 
54  protected: // data
55 
56  int _np, _nq ;
57  int _max_iter;
58 } ;
59 
A useful class for storing the high-level arguments of a program or a function.
Definition: args.h:34
A least square fitter for rational function.
Definition: rational_fitter.h:32
Fitting interface for generic fitting algorithms.
Definition: fitter.h:25
Definition: args.h:23