ALTA  alpha
rational_fitter.h
1 /* ALTA --- Analysis of Bidirectional Reflectance Distribution Functions
2 
3  Copyright (C) 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/rational_function.h>
20 #include <core/data.h>
21 #include <core/vertical_segment.h>
22 #include <core/fitter.h>
23 #include <core/args.h>
24 
25 using namespace alta;
26 
34 {
35  public: // methods
36 
38  virtual ~rational_fitter_quadprog() ;
39 
40  // Fitting a data object
41  //
42  virtual bool fit_data(const ptr<data>& d, ptr<function>& fit, const arguments& args) ;
43 
44  // Provide user parameters to the fitter
45  //
46  virtual void set_parameters(const arguments& args) ;
47 
48  private: // methods
49 
50  protected: // data
51 
52  // Fitting a data object using np elements in the numerator and nq
53  // elements in the denominator
54  virtual bool fit_data(const ptr<vertical_segment>& d, int np, int nq, const ptr<rational_function>& fit) ;
55  virtual bool fit_data(const ptr<vertical_segment>& dat, int np, int nq, int ny, rational_function_1d* fit) ;
56 
57  // min and Max usable np and nq values for the fitting
58  int _max_np, _max_nq ;
59  int _min_np, _min_nq ;
60 
61  // Add constraints to the boundary of the domain. You can shrink it of
62  // the parameter --boundary-constraint *double*
63  double _boundary;
64 
65  std::string _scheduling_mode;
66  int _scheduling_chunk_size;
67  double _scheduling_grow_factor;
68  bool _export_qp;
69  double _delta;
70  bool _add_ls_energy;
71 } ;
72 
A useful class for storing the high-level arguments of a program or a function.
Definition: args.h:34
A vertical segment fitter for rational function using the library QuadProg++ You can find the library...
Definition: rational_fitter.h:33
Fitting interface for generic fitting algorithms.
Definition: fitter.h:25
Definition: args.h:23