chiark / gitweb /
29e320795dc587e7fcebecf7b9690f7ff1f3a194
[moebius2.git] / minimise.h
1 /*
2  * Routines used for minimisation (only)
3  */
4
5 #ifndef MINIMISE_H
6 #define MINIMISE_H
7
8 #include "mgraph.h"
9
10 double compute_energy(const struct Vertices *vs);
11 void energy_init(void);
12
13 double graph_layout_cost(const Vertices v, int section);
14 void graph_layout_prepare();
15
16 double compute_vertex_areas(const Vertices vertices, int section);
17 double compute_edge_lengths(const Vertices vertices, int section);
18  /* these don't actually return anything interesting - they're just
19   * like this so they fit into the parallel/sequential scheme */
20
21 extern double vertex_areas[N], vertex_mean_edge_lengths[N], edge_lengths[N][V6];
22
23 extern const double edge_angle_cost_circcircrat;
24
25 double line_bending_cost(const Vertices vertices, int section);
26 double noncircular_rim_cost(const Vertices vertices, int section);
27 double edge_length_variation_cost(const Vertices vertices, int section);
28 double rim_proximity_cost(const Vertices vertices, int section);
29 double edge_angle_cost(const Vertices vertices, int section);
30 double small_triangles_cost(const Vertices vertices, int section);
31
32 extern const char *input_file, *best_file;
33 extern char *best_file_tmp;
34 extern long long evaluations;
35 extern double stop_epsilon;
36
37 enum printing_instance { pr_cost, pr_size, pr__max };
38 int printing_check(enum printing_instance, int indent);
39
40 #endif /*MINIMISE_H*/