#include"ses_graph.h"
+#include"ses_core.h"
ses_vertex_t* ses_vertex_alloc()
{
for (i = 0; i < graph->size; i++) {
v0 = graph->data[i];
+ ScfEcomponent* c0 = v0->data;
+ scf_loge("graph->size: %d, k: %d, c%ld->edges->size: %d\n", graph->size, k, c0->id, v0->edges->size);
+
if (v0->edges->size > k)
continue;
for (j = i + 1; j < graph->size; j++) {
v1 = graph->data[j];
+ ScfEcomponent* c1 = v1->data;
+ scf_logi("graph->size: %d, k: %d, c%ld->edges->size: %d\n", graph->size, k, c1->id, v1->edges->size);
+
if (!scf_vector_find(v0->edges, v1)) {
assert(!scf_vector_find(v1->edges, v0));
break;
v1 = NULL;
}
+ printf("\n");
if (v1) {
*pp0 = v0;
}
}
+ scf_loge("\n");
return max;
}
if (!deleted)
return -ENOMEM;
- scf_logd("graph->size: %d, k: %d\n", graph->size, k);
+ scf_logw("graph->size: %d, k: %d\n", graph->size, k);
int ret = __kcolor_delete(graph, k, deleted);
if (ret < 0)
scf_vector_free(deleted);
deleted = NULL;
+ scf_logw("graph->size: %d, k: %d\n\n", graph->size, k);
return 0;
}
goto overflow;
v1->color = v0->color;
+ ScfEcomponent* c0 = v0->data;
+ ScfEcomponent* c1 = v1->data;
+ scf_logi("graph->size: %d, k: %d, c%ld, c%ld, color: %ld\n", graph->size, k, c0->id, c1->id, v0->color);
+
__color_del(__colors, v0->color);
ret = __graph_del(graph, v0);
scf_vector_free(deleted);
deleted = NULL;
+ scf_logw("graph->size: %d, k: %d\n\n", graph->size, k);
return 0;
error: