Commit d32a83ea authored by Laurent Belcour's avatar Laurent Belcour
Browse files

Some cleaning

parent df220034
...@@ -460,7 +460,7 @@ void rational_function::load(const std::string& filename) ...@@ -460,7 +460,7 @@ void rational_function::load(const std::string& filename)
i = 0 ; i = 0 ;
get(j)->update(a, b); get(j)->update(a, b);
#ifndef DEBUG #ifdef DEBUG
std::cout << "<<DEBUG>> loading channel " << j << " with: " << std::endl; std::cout << "<<DEBUG>> loading channel " << j << " with: " << std::endl;
std::cout << " " << a << std::endl; std::cout << " " << a << std::endl;
std::cout << " " << b << std::endl; std::cout << " " << b << std::endl;
......
...@@ -178,7 +178,3 @@ bool nonlinear_fitter_eigen::fit_data(const data* d, function* fit, const argume ...@@ -178,7 +178,3 @@ bool nonlinear_fitter_eigen::fit_data(const data* d, function* fit, const argume
void nonlinear_fitter_eigen::set_parameters(const arguments& args) void nonlinear_fitter_eigen::set_parameters(const arguments& args)
{ {
} }
data* nonlinear_fitter_eigen::provide_data() const { return NULL; }
function* nonlinear_fitter_eigen::provide_function() const { return NULL; }
...@@ -18,22 +18,18 @@ ...@@ -18,22 +18,18 @@
class nonlinear_fitter_eigen: public fitter class nonlinear_fitter_eigen: public fitter
{ {
public: // methods public: // methods
nonlinear_fitter_eigen() ; nonlinear_fitter_eigen() ;
virtual ~nonlinear_fitter_eigen() ; virtual ~nonlinear_fitter_eigen() ;
// Fitting a data object // Fitting a data object
// //
virtual bool fit_data(const data* d, function* fit, const arguments& args) ; virtual bool fit_data(const data* d, function* fit, const arguments& args) ;
// Provide user parameters to the fitter // Provide user parameters to the fitter
// //
virtual void set_parameters(const arguments& args) ; virtual void set_parameters(const arguments& args) ;
// Unsable stuff
virtual data* provide_data() const ;
virtual function* provide_function() const ;
protected: // function protected: // function
......
...@@ -16,10 +16,10 @@ test_kirby=1 ...@@ -16,10 +16,10 @@ test_kirby=1
test_alta=1 test_alta=1
test_merl=0 test_merl=0
fitters="matlab parallel" fitters="quadprog eigen cgal"
#fitters="matlab quadprog parallel eigen cgal" #fitters="matlab quadprog parallel eigen cgal"
#fitter_args="--min-np 1 --np 100 --min-nq 1 --nq 100" #fitter_args="--min-np 1 --np 100 --min-nq 1 --nq 100"
fitter_args="--np 2 --nq 2" fitter_args="--np 10 --nq 10"
#Use the DCA optimizer afterwards #Use the DCA optimizer afterwards
use_dca=0 use_dca=0
...@@ -40,7 +40,7 @@ do ...@@ -40,7 +40,7 @@ do
echo "Using fitter ${fitter} with generated data"; echo "Using fitter ${fitter} with generated data";
echo "------------------------------------------"; echo "------------------------------------------";
./build/data2brdf --input tests/input_${i}.gnuplot --output tests/output${function_append}_${i}_${fitter}.rational $function --fitter /build/librational_fitter_${fitter}.so ${fitter_args} --dt 0.1 $relative > tests/output${function_append}_${i}_${fitter}.out ./build/data2brdf --input tests/input_${i}.gnuplot --output tests/output${function_append}_${i}_${fitter}.rational $function --fitter ./build/librational_fitter_${fitter}.so ${fitter_args} --dt 0.1 $relative > tests/output${function_append}_${i}_${fitter}.out
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
echo "Test number ${i} passed" echo "Test number ${i} passed"
...@@ -50,7 +50,7 @@ do ...@@ -50,7 +50,7 @@ do
#DCA Optimization #DCA Optimization
if [ $use_dca -eq 1 ]; then if [ $use_dca -eq 1 ]; then
./build/data2brdf --input tests/input_${i}.gnuplot --output tests/output${function_append}_${i}_${fitter}_dca.rational $function --fitter /build/librational_fitter_dca.so --bootstrap tests/output${function_append}_${i}_${fitter}.rational > tests/output${function_append}_${i}_${fitter}_dca.out ./build/data2brdf --input tests/input_${i}.gnuplot --output tests/output${function_append}_${i}_${fitter}_dca.rational $function --fitter ./build/librational_fitter_dca.so --bootstrap tests/output${function_append}_${i}_${fitter}.rational > tests/output${function_append}_${i}_${fitter}_dca.out
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
echo "Optimized using DCA" echo "Optimized using DCA"
...@@ -73,7 +73,7 @@ fi ...@@ -73,7 +73,7 @@ fi
## Test with Kirby2 dataset ## Test with Kirby2 dataset
## ##
if [ $test_kirby -eq 1 ]; then if [ $test_kirby -eq 1 ]; then
./build/data2brdf --input ../data/1d/Kirby2/Kirby2.dat --output tests/Kirby2${function_append}.rational $function --fitter /build/librational_fitter_${fitter}.so ${fitter_args} --dt 0.1 $relative > tests/Kirby2${function_append}.out ./build/data2brdf --input ../data/1d/Kirby2/Kirby2.dat --output tests/Kirby2${function_append}.rational $function --fitter ./build/librational_fitter_${fitter}.so ${fitter_args} --dt 0.1 $relative > tests/Kirby2${function_append}.out
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
echo "Test Kirby2 passed" echo "Test Kirby2 passed"
......
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