chiark / gitweb /
wip new energy functions
[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);
14 void graph_layout_prepare();
15
16 void compute_vertex_areas(const Vertices vertices);
17 void compute_edge_lengths(const Vertices vertices);
18 extern double vertex_areas[N], vertex_mean_edge_lengths[N], edge_lengths[N][V6];
19
20 double line_bending_cost(const Vertices vertices);
21 double noncircular_rim_cost(const Vertices vertices);
22 double edge_length_variation_cost(const Vertices vertices);
23 double rim_proximity_cost(const Vertices vertices);
24 double edge_angle_cost(const Vertices vertices);
25 double small_triangles_cost(const Vertices vertices);
26
27 extern const char *input_file, *best_file;
28 extern char *best_file_tmp;
29 extern long long evaluations;
30 extern double stop_epsilon;
31
32 enum printing_instance { pr_cost, pr_size, pr__max };
33 int printing_check(enum printing_instance, int indent);
34
35 #endif /*MINIMISE_H*/