Commit 1b168a10 authored by Ludovic Courtès's avatar Ludovic Courtès

core: 'rational_function' constructors take a 'parameters' object.

parent e69693c4
...@@ -41,9 +41,13 @@ class rational_function_1d : public function ...@@ -41,9 +41,13 @@ class rational_function_1d : public function
{ {
public: // methods public: // methods
rational_function_1d() ; rational_function_1d(const parameters& params,
unsigned int np = 0, unsigned int nq = 0,
bool separable = false);
rational_function_1d() ALTA_DEPRECATED;
rational_function_1d(int nX, unsigned int np, unsigned int nq, rational_function_1d(int nX, unsigned int np, unsigned int nq,
bool separable = false) ; bool separable = false) ALTA_DEPRECATED;
virtual ~rational_function_1d() {} virtual ~rational_function_1d() {}
......
...@@ -26,6 +26,16 @@ ALTA_DLL_EXPORT function* provide_function() ...@@ -26,6 +26,16 @@ ALTA_DLL_EXPORT function* provide_function()
return new rational_function_chebychev(); return new rational_function_chebychev();
} }
rational_function_chebychev::rational_function_chebychev(const alta::parameters& params,
int np, int nq)
: rational_function(params, np, nq)
{
}
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
rational_function_chebychev::rational_function_chebychev() : rational_function() rational_function_chebychev::rational_function_chebychev() : rational_function()
{ {
} }
...@@ -43,7 +53,15 @@ rational_function_chebychev_1d::rational_function_chebychev_1d(int nX, int np, i ...@@ -43,7 +53,15 @@ rational_function_chebychev_1d::rational_function_chebychev_1d(int nX, int np, i
rational_function_1d(nX, np, nq) rational_function_1d(nX, np, nq)
{ {
} }
#pragma GCC diagnostic pop
rational_function_chebychev_1d::rational_function_chebychev_1d(const parameters& params,
int np, int nq)
: rational_function_1d(params, np, nq)
{
}
double recursive_chebychev(double x, int i) { double recursive_chebychev(double x, int i) {
switch(i) { switch(i) {
case 0: case 0:
......
/* ALTA --- Analysis of Bidirectional Reflectance Distribution Functions /* ALTA --- Analysis of Bidirectional Reflectance Distribution Functions
Copyright (C) 2013, 2014 Inria Copyright (C) 2013, 2014, 2016 Inria
This file is part of ALTA. This file is part of ALTA.
...@@ -28,8 +28,10 @@ class rational_function_chebychev_1d : public rational_function_1d ...@@ -28,8 +28,10 @@ class rational_function_chebychev_1d : public rational_function_1d
{ {
public: // methods public: // methods
rational_function_chebychev_1d() ; rational_function_chebychev_1d(const parameters&, int np, int nq);
rational_function_chebychev_1d(int nX, int np, int nq) ;
rational_function_chebychev_1d() ALTA_DEPRECATED;
rational_function_chebychev_1d(int nX, int np, int nq) ALTA_DEPRECATED;
virtual ~rational_function_chebychev_1d() {} virtual ~rational_function_chebychev_1d() {}
// Get the p_i and q_j function // Get the p_i and q_j function
...@@ -63,9 +65,11 @@ class rational_function_chebychev : public rational_function ...@@ -63,9 +65,11 @@ class rational_function_chebychev : public rational_function
{ {
public: // methods public: // methods
rational_function_chebychev() ; rational_function_chebychev(const alta::parameters& params,
virtual ~rational_function_chebychev() ; int np = 0, int nq = 0);
rational_function_chebychev() ALTA_DEPRECATED;
virtual ~rational_function_chebychev();
//! Get the 1D function associated with color channel i. If no one exist, //! Get the 1D function associated with color channel i. If no one exist,
//! this function allocates a new element. If i > nY, it returns NULL. //! this function allocates a new element. If i > nY, it returns NULL.
virtual rational_function_1d* get(int i) ; virtual rational_function_1d* get(int i) ;
......
...@@ -21,6 +21,8 @@ ALTA_DLL_EXPORT function* provide_function() ...@@ -21,6 +21,8 @@ ALTA_DLL_EXPORT function* provide_function()
return new rational_function_legendre(); return new rational_function_legendre();
} }
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
rational_function_legendre_1d::rational_function_legendre_1d() rational_function_legendre_1d::rational_function_legendre_1d()
{ {
} }
...@@ -31,6 +33,14 @@ rational_function_legendre_1d::rational_function_legendre_1d(int nX, int np, int ...@@ -31,6 +33,14 @@ rational_function_legendre_1d::rational_function_legendre_1d(int nX, int np, int
_parameters = alta::parameters(nX, 0, param, params::UNKNOWN_OUTPUT); _parameters = alta::parameters(nX, 0, param, params::UNKNOWN_OUTPUT);
} }
#pragma GCC diagnostic pop
rational_function_legendre_1d::rational_function_legendre_1d(const parameters& params,
int np, int nq)
: rational_function_1d(params, np, nq)
{
}
double rational_function_legendre_1d::legendre(double x, int i) const double rational_function_legendre_1d::legendre(double x, int i) const
{ {
if(i == 0) if(i == 0)
...@@ -106,11 +116,19 @@ double rational_function_legendre_1d::q(const vec& x, int i) const ...@@ -106,11 +116,19 @@ double rational_function_legendre_1d::q(const vec& x, int i) const
return res ; return res ;
} }
rational_function_legendre::rational_function_legendre(const parameters& params)
: rational_function(params)
{
}
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
rational_function_legendre::rational_function_legendre() rational_function_legendre::rational_function_legendre()
{ {
} }
#pragma GCC diagnostic pop
rational_function_legendre::~rational_function_legendre() rational_function_legendre::~rational_function_legendre()
{ {
} }
......
...@@ -28,6 +28,8 @@ class rational_function_legendre_1d : public rational_function_1d ...@@ -28,6 +28,8 @@ class rational_function_legendre_1d : public rational_function_1d
{ {
public: // methods public: // methods
rational_function_legendre_1d(const parameters& params, int np, int nq);
rational_function_legendre_1d() ; rational_function_legendre_1d() ;
rational_function_legendre_1d(int nX, int np, int nq, params::input params) ; rational_function_legendre_1d(int nX, int np, int nq, params::input params) ;
virtual ~rational_function_legendre_1d() {} virtual ~rational_function_legendre_1d() {}
...@@ -60,7 +62,8 @@ class rational_function_legendre : public rational_function ...@@ -60,7 +62,8 @@ class rational_function_legendre : public rational_function
{ {
public: // methods public: // methods
rational_function_legendre() ; rational_function_legendre(const parameters& params);
rational_function_legendre() ALTA_DEPRECATED;
virtual ~rational_function_legendre() ; virtual ~rational_function_legendre() ;
//! Get the 1D function associated with color channel i. If no one exist, //! Get the 1D function associated with color channel i. If no one exist,
......
...@@ -63,10 +63,20 @@ double rational_function_legendre_1d::q(const vec& x, int i) const ...@@ -63,10 +63,20 @@ double rational_function_legendre_1d::q(const vec& x, int i) const
} }
rational_function_legendre::rational_function_legendre(const parameters& params)
: rational_function(params)
{
}
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
rational_function_legendre::rational_function_legendre() rational_function_legendre::rational_function_legendre()
{ {
} }
#pragma GCC diagnostic pop
rational_function_legendre::~rational_function_legendre() rational_function_legendre::~rational_function_legendre()
{ {
} }
......
...@@ -67,7 +67,8 @@ class rational_function_legendre : public rational_function ...@@ -67,7 +67,8 @@ class rational_function_legendre : public rational_function
{ {
public: // methods public: // methods
rational_function_legendre() ; rational_function_legendre(const parameters& params);
rational_function_legendre() ALTA_DEPRECATED;
virtual ~rational_function_legendre() ; virtual ~rational_function_legendre() ;
//! Get the 1D function associated with color channel i. If no one exist, //! Get the 1D function associated with color channel i. If no one exist,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment