]> mj.ucw.cz Git - leo.git/blobdiff - labeller.h
Labelling: Hacks and fixes in segment creation
[leo.git] / labeller.h
index d8d4db6f62647cf25b1e2f090e7c5f03492903d8..d6f53ef60fb3ad0e3249956aed85fdfc086e0d78 100644 (file)
@@ -152,10 +152,28 @@ struct placement
   double y;
   int variant_used;
   bool processed;
+  // FIXME: Replace with clist?
+  struct placement_link *map_links;
+  struct individual *individual;
+};
+
+struct placement_link
+{
+  struct map_placement *mp;
+  struct placement_link *next;
+};
+
+struct map_placement
+{
+  struct placement *placement;
+  struct map_placement *next;
+  struct map_placement *prev;
 };
 
 struct map_part
 {
+  // FIXME: Replace with clist?
+  struct map_placement *placement;
 };
 
 struct individual
@@ -172,45 +190,4 @@ void labeller_label(void);
 void labeller_add_linelabel(struct symbol *sym, struct osm_object *o, z_index_t zindex);
 void labeller_add_arealabel(struct symbol *sym, struct osm_object *o, z_index_t zindex);
 
-void make_bitmap_icon(struct point_variant *v, struct sym_icon *si);
-void make_bitmap_point(struct point_variant *v, struct sym_point *sp);
-void make_bitmap_label(struct point_variant *v, struct sym_text *text);
-
-void make_graph(void);
-void label_graph(void);
-void join_edge(struct graph_edge *e, int dir);
-void bfs(uns longline);
-void make_segments(void);
-
-void make_population(void);
-bool shall_terminate(void);
-void breed(void);
-void mutate(void);
-void elite(void);
-void rank_population(void);
-
-struct individual **perform_crossover(struct individual *parent1, struct individual *parent2);
-void perform_mutation(struct individual *individual);
-
-void init_placement(struct placement *p, struct request *r);
-void init_individual(struct individual *i);
-struct map_part **get_parts(struct placement *symbol, struct individual *individual);
-
-int randint(int min, int max);
-
-struct placement **get_closure(struct placement *placement, struct individual *parent1, struct individual *parent2);
-void copy_symbols(struct placement **closure, struct individual *parent, struct individual *child);
-void move_symbol(struct placement *p);
-void move_symbol_point(struct placement *p);
-
-struct placement **get_overlapping(struct placement *p);
-void filter(struct placement **list, bool *pred);
-
-int flip(int a, int b);
-double randdouble(void);
-
-void cleanup(void);
-
-void copy_individual(struct individual *src, struct individual *dest);
-
 #endif