n_crosses += edge0->crosses->size;
}
- scf_loge("n_crosses: %ld\n\n", n_crosses);
+ scf_loge("edge->size: %d, n_crosses: %ld\n\n", edges->size, n_crosses);
#endif
return 0;
{
scf_vector_t* graph = scf_vector_alloc();
scf_vector_t* colors = scf_vector_alloc();
+
ses_edge_t* edge;
+ intptr_t N = 4;
+ intptr_t i;
+
scf_loge("\n");
__ses_get_crosses(f, d, graph);
- scf_vector_add(colors, (void*)1);
- scf_vector_add(colors, (void*)2);
+ for (i = 0; i < graph->size; i++) {
+ edge = graph->data[i];
+ scf_logi("i: %ld, c%ld->color: %ld\n", i, edge->c->id, edge->color);
+ }
+
+ for (i = 1; i <= N; i++)
+ scf_vector_add(colors, (void*)i);
- int ret = ses_cross_graph_kcolor(graph, 2, colors);
+ int ret = ses_cross_graph_kcolor(graph, N, colors);
if (ret < 0) {
scf_loge("\n");
}
- int i;
for (i = 0; i < graph->size; i++) {
edge = graph->data[i];
-
- scf_logi("i: %d, c%ld->color: %ld\n", i, edge->c->id, edge->color);
+ scf_logi("i: %ld, c%ld->color: %ld\n", i, edge->c->id, edge->color);
}
scf_vector_clear(graph, ( void (*)(void*) )ses_edge_free);
qsort(f->elines, f->n_elines, sizeof(ScfEline*), eline_cmp_id);
+ ses_cross(f, d);
+
__ses_de_cross(f, d);
__ses_setc_xy(f, d);
__ses_xchg_cx(f, d);
__ses_xchg_ce(f, d);
- ses_cross(f, d);
-
__ses_mov_pos(f, d);
__ses_layout_cx(f, d);