ALTA  alpha
rational_function.h
1 /* ALTA --- Analysis of Bidirectional Reflectance Distribution Functions
2 
3  Copyright (C) 2013, 2014, 2016 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/fitter.h>
22 #include <core/args.h>
23 #include <core/common.h>
24 
25 using namespace alta;
26 
27 class rational_function_chebychev_1d : public rational_function_1d
28 {
29 public: // methods
30 
31  rational_function_chebychev_1d(const parameters&, int np, int nq);
32 
33  rational_function_chebychev_1d() ALTA_DEPRECATED;
34  rational_function_chebychev_1d(int nX, int np, int nq) ALTA_DEPRECATED;
35  virtual ~rational_function_chebychev_1d() {}
36 
37  // Get the p_i and q_j function
38  virtual double p(const vec& x, int i) const ;
39  virtual double q(const vec& x, int j) const ;
40 
41 protected: // methods
42 
43 } ;
44 
64 class rational_function_chebychev : public rational_function
65 {
66  public: // methods
67 
69  int np = 0, int nq = 0);
70  rational_function_chebychev() ALTA_DEPRECATED;
71  virtual ~rational_function_chebychev();
72 
75  virtual rational_function_1d* get(int i) ;
76 
80  virtual void update(int i, rational_function_1d* r)
81  {
82  if(dynamic_cast<rational_function_chebychev_1d*>(r) != NULL)
83  {
84  rational_function::update(i, r);
85  }
86  else
87  {
88 #ifdef DEBUG
89  std::cerr << "<<ERROR>> the function provided is not of type \"rational_function_chebychev\"" << std::endl;
90 #endif
91  }
92  }
93 } ;
94 
Rational function using Chebychev polynomials.
Definition: rational_function.h:64
Definition: rational_function.h:27
a static class allowing to change from one parametrization to another.
Definition: params.h:42
A parameters object. Allow to define function object (either data or functions that are defined over ...
Definition: params.h:435
Definition: args.h:23