chiark / gitweb /
helixish: attempt at the whole thing
[moebius3.git] / findcurve.c
index 9d86ff485375f03f670d9415876ab1cb8462d48b..c038182e685ca954002d0e0473338077c01f5af4 100644 (file)
@@ -34,6 +34,9 @@ static double cb_Efunc(void *xp) {
     double d = F[i] - target[i];
     e += d*d;
   }
+  //printf("\n cb_Efunc %p %10.7f [", xp, e);
+  //for (i=0; i<N; i++) printf(" %10.7f,", x[i]);
+  //printf("]\n");
   return e;
 }
 
@@ -44,6 +47,9 @@ static void cb_step(const gsl_rng *rng, void *xp, double step_size) {
   gsl_ran_dir_nd(rng, N,step);
   for (i=0; i<N; i++)
     x[i] += step_size * step[i];
+  //printf("\n cb_step %p %10.7f [", xp, step_size);
+  //for (i=0; i<N; i++) printf(" %10.7f,", step[i]);
+  //printf("]\n");
 }
 
 static double cb_metric(void *xp, void *yp) {
@@ -108,12 +114,15 @@ int main(void) {
       .t_initial = 0.5,
       .mu_t = 1.001,
       .t_min = epsilon * 1E-3,
+      .iters_fixed_T = 100,
+      .n_tries = 10,
+      .step_size = 0.05,
     };
 
     gsl_siman_solve(rng,
                    startpoint,
                    cb_Efunc, cb_step, cb_metric,
-                   0, // cb_print,
+                   0, //cb_print,
                    0,0,0, sizeof(startpoint), siman_params);
 
     printcore(startpoint);