Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
alta
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
5
Issues
5
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alta
alta
Commits
24146a6f
Commit
24146a6f
authored
Sep 24, 2013
by
Laurent Belcour
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding Rational Function legendre into the plugins I need to remove it
from the core
parent
98ccc27b
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
116 additions
and
5 deletions
+116
-5
sources/plugins/plugins.pro
sources/plugins/plugins.pro
+6
-5
sources/plugins/rational_function_legendre/rational_function.cpp
.../plugins/rational_function_legendre/rational_function.cpp
+10
-0
sources/plugins/rational_function_legendre/rational_function.h
...es/plugins/rational_function_legendre/rational_function.h
+67
-0
sources/plugins/rational_function_legendre/rational_function_legendre.pro
...rational_function_legendre/rational_function_legendre.pro
+19
-0
sources/scripts/xml_cmd.py
sources/scripts/xml_cmd.py
+14
-0
No files found.
sources/plugins/plugins.pro
View file @
24146a6f
...
...
@@ -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
\
...
...
sources/plugins/rational_function_legendre/rational_function.cpp
0 → 100644
View file @
24146a6f
//#include "rational_function.h"
#include <core/common.h>
#include <core/rational_function.h>
ALTA_DLL_EXPORT
function
*
provide_function
()
{
return
new
rational_function
();
}
sources/plugins/rational_function_legendre/rational_function.h
0 → 100644
View file @
24146a6f
#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
;
}
;
sources/plugins/rational_function_legendre/rational_function_legendre.pro
0 → 100644
View file @
24146a6f
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
sources/scripts/xml_cmd.py
View file @
24146a6f
...
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment