Commit 24146a6f authored by Laurent Belcour's avatar Laurent Belcour

Adding Rational Function legendre into the plugins I need to remove it

from the core
parent 98ccc27b
......@@ -6,13 +6,14 @@ SUBDIRS = \
# rational_fitter_parallel \
rational_fitter_eigen \
rational_fitter_leastsquare \
rational_fitter_matlab \
# rational_fitter_dca \
rational_function_chebychev \
# rational_fitter_matlab \
# rational_fitter_dca \
rational_function_legendre \
nonlinear_fitter_eigen \
# nonlinear_fitter_ceres \
# nonlinear_fitter_ipopt \
# nonlinear_fitter_nlopt \
nonlinear_fitter_ceres \
nonlinear_fitter_ipopt \
nonlinear_fitter_nlopt \
nonlinear_fresnel_schlick \
nonlinear_fresnel_retroschlick \
nonlinear_function_diffuse \
......
//#include "rational_function.h"
#include <core/common.h>
#include <core/rational_function.h>
ALTA_DLL_EXPORT function* provide_function()
{
return new rational_function();
}
#pragma once
// Include STL
#include <vector>
#include <string>
// Interface
#include <core/function.h>
#include <core/rational_function.h>
#include <core/data.h>
#include <core/fitter.h>
#include <core/args.h>
#include <core/common.h>
class rational_function_chebychev_1d : public rational_function_1d
{
public: // methods
rational_function_chebychev_1d() ;
rational_function_chebychev_1d(int np, int nq) ;
rational_function_chebychev_1d(const vec& a, const vec& b) ;
virtual ~rational_function_chebychev_1d() {}
// Get the p_i and q_j function
virtual double p(const vec& x, int i) const ;
virtual double q(const vec& x, int j) const ;
protected: // methods
} ;
class rational_function_chebychev : public rational_function
{
public: // methods
rational_function_chebychev() ;
virtual ~rational_function_chebychev() ;
//! Update the y-1D function for the ith dimension.
//! \note It will test if the 1D function provided is of the dynamic type
//! \name rational_function_chebychev_1d
virtual void update(int i, rational_function_1d* r)
{
if(dynamic_cast<rational_function_chebychev_1d*>(r) != NULL)
{
rational_function::update(i, r);
}
else
{
#ifdef DEBUG
std::cerr << "<<ERROR>> the function provided is not of type \"rational_function_chebychev\"" << std::endl;
#endif
}
}
protected: // methods
//! \brief Save the rational function to the rational format (see \ref formating).
virtual void save(const std::string& filename) const ;
//! \brief Output the rational function using a C++ function formating.
virtual void save_cpp(const std::string& filename, const arguments& args) const ;
//! \brief Output the rational function using a C++ function formating.
virtual void save_matlab(const std::string& filename, const arguments& args) const ;
} ;
TEMPLATE = lib
CONFIG *= qt \
plugin \
eigen
DESTDIR = ../../build
INCLUDEPATH += ../..
HEADERS = rational_function.h
SOURCES = rational_function.cpp
LIBS += -L../../build \
-lcore
#QMAKE_CXXFLAGS += -frounding-math \
# -fPIC \
# -g
......@@ -23,6 +23,16 @@ def libName(name):
#endif
#end
## Relative directories
lib_dir = "";
dat_dir = "";
## Parse the configuration part of the XML file, this will set the global
## parameters such as the relative directories.
##
def parseConfiguration(xmlNode):
#end
def parseFit(xmlNode):
cmd = "";
......@@ -52,6 +62,10 @@ for child in root:
cmd = "";
if(child.tag == "cofiguration"):
parseConfiguration(child);
#end
if(child.tag == "fit"):
cmd += "./build/data2brdf";
cmd += parseFit(child);
......
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