chiark / gitweb /
compute initial layout - not yet checked
[moebius2.git] / energy.c
index e0ebbe24a90beb61890b1c6767f54992938d5810..aa1c7f4d29ee7820c7abe784e414e8cac99ebd20 100644 (file)
--- a/energy.c
+++ b/energy.c
@@ -17,8 +17,6 @@ static double noncircular_rim_cost(const Vertices vertices);
 
 static void compute_vertex_areas(const Vertices vertices, double areas[N]);
 static double best_energy= DBL_MAX;
-static void flushoutput(void);
-static void diee(const char *what) { perror(what); exit(16); }
 
 static void cost(double *energy, double tweight, double tcost);
 #define COST(weight, compute) cost(&energy, (weight), (compute))
@@ -60,10 +58,6 @@ static void cost(double *energy, double tweight, double tcost) {
   *energy += tenergy;
 }
 
-static void flushoutput(void) {
-  if (fflush(stdout) || ferror(stdout)) diee("stdout");
-}
-
 static void compute_vertex_areas(const Vertices vertices, double areas[N]) {
   int v0,v1,v2, e1,e2, k;
   
@@ -124,8 +118,6 @@ static gsl_multimin_fminimizer *minimiser;
 
 static const double stop_epsilon= 1e-4;
 
-#define DIM (N*D3)
-
 static double minfunc_f(const gsl_vector *x, void *params) {
   assert(x->size == DIM);
   assert(x->stride == 1);