*jtr = jr0 / -R;
}
-static int ses_vertex_cmp_edges(const void* v0, const void* v1)
-{
- const ses_vertex_t* sv0 = *(const ses_vertex_t**)v0;
- const ses_vertex_t* sv1 = *(const ses_vertex_t**)v1;
-
- const ScfEcomponent* c0 = sv0->data;
- const ScfEcomponent* c1 = sv1->data;
-
- if (sv0->edges->size > sv1->edges->size)
- return -1;
- if (sv0->edges->size < sv1->edges->size)
- return 1;
-
- if (SCF_EDA_NPN == c0->type)
- return -1;
- if (SCF_EDA_NPN == c1->type)
- return 1;
-
- return 0;
-}
-
#endif
int ses_graph_kcolor(ses_graph_t* graph, int k, scf_vector_t* colors);
+static int ses_vertex_cmp_edges(const void* v0, const void* v1)
+{
+ const ses_vertex_t* sv0 = *(const ses_vertex_t**)v0;
+ const ses_vertex_t* sv1 = *(const ses_vertex_t**)v1;
+
+ if (sv0->edges->size > sv1->edges->size)
+ return -1;
+ if (sv0->edges->size < sv1->edges->size)
+ return 1;
+ return 0;
+}
+
static int ses_vertex_cmp(const void* v0, const void* v1)
{
const ses_vertex_t* sv0 = v0;
scf_loge("**********\n");
}
- int n = 0;
for (i = 0; i < graph->size; i++) {
v = graph->data[i];
if (v->color < 0) {
- c = v->data;
scf_loge("j: %ld, i: %ld, c%ld->color: %ld\n", j, i, c->id, v->color);
- n++;
+ break;
}
}
- if (n > 0)
+ if (i < graph->size)
break;
for (i = 0; i < graph->size; i++) {