if (label_sizes){
if (agget(n, "width") && agget(n, "height")){
sscanf(agget(n, "width"), "%lf", &sz);
- /* (*label_sizes)[i*2] = POINTS(sz)*.6;*/
(*label_sizes)[i*2] = POINTS(sz)*.5 + padding*0.5;
sscanf(agget(n, "height"), "%lf", &sz);
- /*(*label_sizes)[i*2+1] = POINTS(sz)*.6;*/
(*label_sizes)[i*2+1] = POINTS(sz)*.5 + padding*0.5;
} else {
(*label_sizes)[i*2] = 4*POINTS(0.75)*.5;
label_string = strcat(label_string, " nodes, ");
snprintf(buf, sizeof(buf), "%d", A->nz);
label_string = strcat(label_string, buf);
- /* label_string = strcat(label_string, " edges. Created by Yifan Hu");*/
label_string = strcat(label_string, " edges.");
ND_id(n) = i++;
}
-
- /*
- for (n = agfstnode (g); n; n = agnxtnode (g, n)) {
- for (ep = agfstedge(g, n); ep; ep = agnxtedge(g, ep, n)) {
- if (agtail(ep) == n) continue;
- agedge(dg, ndmap[ND_id(agtail(ep))], ndmap[ND_id(aghead(ep))]);
- }
- }
- */
-
-
-
for (n = agfstnode (g); n; n = agnxtnode (g, n)) {
for (ep = agfstedge(g, n); ep; ep = agnxtedge(g, ep, n)) {
if (agtail(ep) == n && (aghead(ep) != n)) continue;
i = ND_id(n);
if (rgb_r && rgb_g && rgb_b) {
rgb2hex((rgb_r)[(clusters)[i]],(rgb_g)[(clusters)[i]],(rgb_b)[(clusters)[i]], scluster, NULL);
- //sprintf(scluster,"#%2x%2x%2x", (int) (255*((rgb_r)[(clusters)[i]])), (int) (255*((rgb_g)[(clusters)[i]])), (int) (255*((rgb_b)[(clusters)[i]])));
}
agxset(n,clust_clr_sym,scluster);
}
sym = agattr(g, AGEDGE, "weight", NULL);
clust_sym = agattr(g, AGNODE, "cluster", NULL);
clust_clr_sym = agattr(g, AGNODE, "clustercolor", NULL);
- //sym = agattr(g, AGEDGE, "wt", NULL);
i = 0;
for (n = agfstnode (g); n; n = agnxtnode (g, n)) {
row = ND_id(n);
}
if (pal){
- // assert((*clusters)[i] >= 0 && (*clusters)[i] <= MAX_GRPS);
(*rgb_r)[(*clusters)[i]] = pal[3*j+0];
(*rgb_g)[(*clusters)[i]] = pal[3*j+1];
(*rgb_b)[(*clusters)[i]] = pal[3*j+2];