From: Ian Jackson Date: Fri, 4 Jan 2008 19:21:31 +0000 (+0000) Subject: tuning X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=moebius2.git;a=commitdiff_plain;h=e6ff377c3c846274fa3d7d98e83512d5e4226f56;ds=sidebyside tuning --- diff --git a/energy.c b/energy.c index b53199e..78b8f31 100644 --- a/energy.c +++ b/energy.c @@ -39,7 +39,7 @@ static double compute_energy(const Vertices vertices) { if (printing) printf("cost > energy |"); COST(1e2, edgewise_vertex_displacement_cost(vertices)); -// COST(1e0, graph_layout_cost(vertices,vertex_areas)); + COST(1e2, graph_layout_cost(vertices,vertex_areas)); // COST(1e4, noncircular_rim_cost(vertices)); if (printing) printf("| total %# e |", energy); @@ -124,7 +124,7 @@ static void compute_vertex_areas(const Vertices vertices, double areas[N]) { static gsl_multimin_fminimizer *minimiser; -static const double stop_epsilon= 1e-4; +static const double stop_epsilon= 1e-6; static double minfunc_f(const gsl_vector *x, void *params) { assert(x->size == DIM); @@ -258,7 +258,7 @@ double edgewise_vertex_displacement_cost(const Vertices vertices) { double cost= pow(delta,3); if (!e && !(qi & YMASK)) - cost *= 1e3; + cost *= 10; total_cost += cost; } diff --git a/mgraph.h b/mgraph.h index 19cd601..eb4bd12 100644 --- a/mgraph.h +++ b/mgraph.h @@ -62,7 +62,7 @@ #include "common.h" -#define XBITS 4 +#define XBITS 3 #define X (1<