]> mj.ucw.cz Git - leo.git/blobdiff - labeller.h
Labelling: Breaking labeller into more source files
[leo.git] / labeller.h
index 34d66850259895ea9d13a6b879fa2b6a09dbdd22..4c0aacc4722a3cd48ed17f0d3ad236cb4f3f638d 100644 (file)
@@ -1,24 +1,7 @@
 #ifndef _LEO_LABELLER_H
 #define _LEO_LABELLER_H
 
-enum verbosity
-{
-  VERBOSITY_NONE,
-  VERBOSITY_GENERAL,
-  VERBOSITY_POPULATION,
-  VERBOSITY_INDIVIDUAL,
-  VERBOSITY_PLACEMENT,
-  VERBOSITY_ALL,
-};
-
-enum edge_dir
-{
-  DIR_INVALID,
-  DIR_UNSET,
-  DIR_CENTER,
-  DIR_FWD,
-  DIR_BWD,
-};
+#include "lab-utils.h"
 
 enum request_type
 {
@@ -30,14 +13,6 @@ enum request_type
   REQUEST_SEGMENT,
 };
 
-enum term_cond
-{
-  TERM_COND_UNDEF,
-  TERM_COND_PENALTY,
-  TERM_COND_STAGNATION,
-  TERM_COND_ITERATIONS,
-};
-
 struct variant
 {
   int width;
@@ -116,40 +91,6 @@ struct buffer_linelabel
   z_index_t zindex;
 };
 
-struct graph_node
-{
-  osm_id_t id;
-  struct osm_node *o;
-  struct graph_edge **edges;
-  int num;
-};
-
-struct graph_edge
-{
-  osm_id_t id;
-  double length;
-  color_t color;
-  int visited;
-  struct graph_edge *prev;
-  struct graph_edge *next;
-  struct graph_node *n1;
-  struct graph_node *n2;
-  uns longline;
-  struct symbol *label;
-  struct sym_line *line;
-  z_index_t zindex;
-  enum edge_dir dir;
-  struct graph_node *anode;
-  struct graph_node *bnode; // DEBUG PRINT
-  int num; // DEBUG
-};
-
-struct longline
-{
-  uns id;
-  struct graph_edge *first;
-};
-
 struct placement
 {
   struct request *request;
@@ -191,9 +132,46 @@ void labeller_conf(void);
 void labeller_init(void);
 void labeller_cleanup(void);
 
+void labeller_label(void);
+
 void labeller_add_point(struct symbol *sym, struct osm_object *object, z_index_t zindex);
 void labeller_notify_line(struct symbol *sym, z_index_t zindex);
-void labeller_label(void);
 void labeller_add_label(struct symbol *sym, struct osm_object *o, z_index_t zindex);
 
+extern struct request_point *requests_point;
+extern struct request_line *requests_line;
+extern struct request_area *requests_area;
+
+extern struct longline *longlines;
+extern struct buffer_line *buffer_line;
+extern struct buffer_linelabel *buffer_linelabel;
+
+extern int dbg_segments;
+extern int dbg_plan;
+extern int dbg_requests;
+extern int dbg_graph;
+extern int dbg_bfs;
+extern int dbg_map_parts;
+extern int dbg_movement;
+extern int dbg_init;
+extern int dbg_overlaps;
+extern int dbg_rank;
+extern int dbg_evolution;
+extern int dbg_mutation;
+extern int dbg_breeding;
+
+extern int page_width_int;
+extern int page_height_int;
+
+extern int num_requests;
+extern int num_placements;
+
+extern int conf_map_part_width;
+extern int conf_map_part_height;
+
+extern uns num_map_parts_row;
+extern uns num_map_parts_col;
+extern uns num_map_parts;
+
+
 #endif