static void compute_vertex_areas(const Vertices vertices, double areas[N]);
static double best_energy= DBL_MAX;
-static void cost(double *energy, double tweight, double tcost);
-#define COST(weight, compute) cost(&energy, (weight), (compute))
+static void addcost(double *energy, double tweight, double tcost);
+#define COST(weight, compute) addcost(&energy, (weight), (compute))
/*---------- main energy computation and subroutines ----------*/
return energy;
}
-static void cost(double *energy, double tweight, double tcost) {
+static void addcost(double *energy, double tweight, double tcost) {
double tenergy= tweight * tcost;
printf(" %# e > %# e |", tcost, tenergy);
*energy += tenergy;