Commit d3fccb69 by Laurent Belcour

### Adding the DCA in the test suit. But the code is not giving good results.

parent 9eaf4d9b
 ... ... @@ -14,7 +14,7 @@ #define BUFFER_SIZE 10000 fitter* provide_fitter() ALTA_DLL_EXPORT fitter* provide_fitter() { return new rational_fitter_dca(); } ... ... @@ -196,10 +196,10 @@ bool rational_fitter_dca::fit_data(const data* d, int np, int nq, rational_funct double delta_k; // Loop until you get a converge solution \delta > \delta_k // \todo add the correct looping condition do { // delta_{k+1} = delta_{k} //delta_k = distance(r, d); delta_k = delta; // The function to minimize is \delta which is the last element of ... ... @@ -328,7 +328,8 @@ bool rational_fitter_dca::fit_data(const data* d, int np, int nq, rational_funct #endif // Compute the new delta_k, the distance to the data points // delta = distance(r, d); delta = distance(r, d); //delta = val[(np+nq)*nY]; }while(delta <= delta_k); ... ...
 ... ... @@ -11,16 +11,19 @@ if [ $use_relative -eq 1 ]; then relative="--dt-relative" fi test_generated=0 test_generated=1 test_kirby=0 test_alta=1 test_alta=0 test_merl=0 #fitter="matlab" #fitter="quadprog" #fitter="cgal" fitter="parallel" fitter_args="--min-np 1 --np 100 --min-nq 1 --nq 100" #fitter="parallel" fitter="eigen" #fitter_args="--min-np 1 --np 100 --min-nq 1 --nq 100" fitter_args="--np 10 --nq 10" mkdir tests ... ... @@ -31,15 +34,22 @@ min_test=1; max_test=6 for i in seq$min_test $max_test do ./build/generate_data --f$i mv input.gnuplot tests/input_$i.gnuplot ./build/data2brdf --input tests/input_$i.gnuplot --output tests/output${function_append}_$i.rational $function --fitter /build/librational_fitter_${fitter}.so ${fitter_args} --dt 0.1$relative > tests/output${function_append}_$i.out mv input.gnuplot tests/input_${i}.gnuplot ./build/data2brdf --input tests/input_${i}.gnuplot --output tests/output${function_append}_${i}.rational $function --fitter /build/librational_fitter_${fitter}.so ${fitter_args} --dt 0.1$relative > tests/output${function_append}_${i}.out if [ $? -eq 0 ]; then echo "Test number$i passed" ./build/brdf2gnuplot --input tests/output${function_append}_$i.rational $function --data tests/input_$i.gnuplot --output tests/output_$i.gnuplot > /dev/null else echo "Test number$i failed" fi if [ $? -eq 0 ]; then echo "Test number${i} passed" ./build/brdf2gnuplot --input tests/output${function_append}_${i}.rational $function --data tests/input_${i}.gnuplot --output tests/output_${i}.gnuplot > /dev/null #DCA Optimization ./build/data2brdf --input tests/input_${i}.gnuplot --output tests/output${function_append}_${i}_dca.rational $function --fitter /build/librational_fitter_dca.so --bootstrap tests/output${function_append}_${i}.rational > tests/output${function_append}_${i}_dca.out if [$? -eq 0 ]; then ./build/brdf2gnuplot --input tests/output${function_append}_${i}_dca.rational $function --data tests/input_${i}.gnuplot --output tests/output_${i}_dca.gnuplot > /dev/null fi else echo "Test number$i failed" fi done fi ... ... @@ -63,6 +73,8 @@ if [ $test_alta -eq 1 ]; then ## Beige matusik fitting only a 2D accumulation in the ROMEIRO param ## echo "./build/data2brdf --input ../data/2d/matusik_merl/beige-fabric-double-cc-cos-th-td-90deg.dat --output tests/beige${function_append}.rational $function --fitter /build/librational_fitter_${fitter}.so ${fitter_args} --dt 0.5 --dt-relative > tests/beige${function_append}.out" echo "./build/data2brdf --input ../data/2d/matusik_merl/beige-fabric-double-cc-cos-th-td-90deg.dat --output tests/beige${function_append}_dca.rational$function --fitter /build/librational_fitter_dca.so ${fitter_args} --bootstrap tests/beige${function_append}.rational > tests/beige${function_append}_dca.out" # if [$? -eq 0 ]; then # echo "Test beige matusik passed" ... ...
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!