dot must be integers; change other uses of AGID to AGSEQ.
static void
emitEdge (Agraph_t* G, Agedge_t* e, FILE* outFile)
{
- fprintf (outFile, " edge [\n id %lu\n", AGID(e));
+ fprintf (outFile, " edge [\n id %lu\n", AGSEQ(e));
fprintf (outFile, " source %lu\n", ID(agtail(e)));
fprintf (outFile, " target %lu\n", ID(aghead(e)));
emitEdgeAttrs (G, e, outFile, 2);
writeSubgs(stp, g, gxlFile);
dd = (Agdatadict_t *) agdatadict(g, FALSE);
for (n = agfstnode(g); n; n = agnxtnode(g, n)) {
- realn = agidnode(stp->root, AGID(n), 0);
+ realn = agidnode(stp->root, AGSEQ(n), 0);
if (!writeval(realn)) {
writeval(realn) = 1;
writeNode(stp, n, gxlFile, dd->dict.n);
<TR><TD><A NAME=a:voro_margin HREF=#d:voro_margin>voro_margin</A>
</TD><TD>G</TD><TD>double</TD><TD ALIGN="CENTER">0.05</TD><TD>0.0</TD><TD>not dot</TD> </TR>
<TR><TD><A NAME=a:weight HREF=#d:weight>weight</A>
-</TD><TD>E</TD><TD>double</TD><TD ALIGN="CENTER">1.0</TD><TD>0(dot)<BR>1(neato,fdp)</TD><TD></TD> </TR>
+</TD><TD>E</TD><TD>int<BR>double</TD><TD ALIGN="CENTER">1</TD><TD>0(dot)<BR>1(neato,fdp)</TD><TD></TD> </TR>
<TR><TD><A NAME=a:width HREF=#d:width>width</A>
</TD><TD>N</TD><TD>double</TD><TD ALIGN="CENTER">0.75</TD><TD>0.01</TD><TD></TD> </TR>
<TR><TD><A NAME=a:xlabel HREF=#d:xlabel>xlabel</A>
<DT><A NAME=d:weight HREF=#a:weight><STRONG>weight</STRONG></A>
<DD> Weight of edge. In dot, the heavier the weight, the shorter,
straighter and more vertical the edge is.
+ For other layouts, a larger weight encourages the layout to
+ make the edge length closer to that specified by the
+ <A HREF=#d:len>len</A> attribute.
<DT><A NAME=d:width HREF=#a:width><STRONG>width</STRONG></A>
<DD> Width of node, in inches. This is taken as the initial, minimum width
# Obsolete, replaced by sep
#w:E:double:1.0; neato
# Redundant definition of weight in neato, cf. bug 9.
-:weight:E:double:1.0:0(dot)/1(neato,fdp);
+:weight:E:int/double:1:0(dot)/1(neato,fdp);
Weight of edge. In dot, the heavier the weight, the shorter,
straighter and more vertical the edge is.
+<B>N.B.</B> Weights in dot must be integers.
+For other layouts, a larger weight encourages the layout to
+make the edge length closer to that specified by the
+<A HREF=#d:len>len</A> attribute.
:width:N:double:0.75:0.01;
Width of node, in inches. This is taken as the initial, minimum width
of the node. If <A HREF=#d:fixedsize><B>fixedsize</B></A> is true, this
unsigned char showboxes;
boolean conc_opp_flag;
short xpenalty;
- float weight;
+ int weight;
int cutvalue, tree_index;
short count;
unsigned short minlen;
#endif /* WITH_CGRAPH */
common_init_edge(e);
- ED_weight(e) = late_double(e, E_weight, 1.0, 0.0);
+ ED_weight(e) = late_int(e, E_weight, 1, 0);
tailgroup = late_string(agtail(e), N_group, "");
headgroup = late_string(aghead(e), N_group, "");
ED_count(e) = ED_xpenalty(e) = 1;
return (v0 - v1);
/* This provides a cheap test for edges having the same set of endpoints. */
- if (AGID(le0) != AGID(le1))
- return (AGID(le0) - AGID(le1));
+ if (AGSEQ(le0) != AGSEQ(le1))
+ return (AGSEQ(le0) - AGSEQ(le1));
ea = (ED_tail_port(e0).defined || ED_head_port(e0).defined) ? e0 : le0;
if (ED_tree_index(ea) & BWDEDGE) {
if (et0 == FLATEDGE && ED_label(e0) != ED_label(e1))
return (int) (ED_label(e0) - ED_label(e1));
- return (AGID(e0) - AGID(e1));
+ return (AGSEQ(e0) - AGSEQ(e1));
}
/* cloneGraph:
ED_edge_type(e) = VIRTUAL;
if (orig) {
- AGID(e) = AGID(orig);
+ AGSEQ(e) = AGSEQ(orig);
#ifdef WITH_CGRAPH
- AGID(&(e2->in)) = AGID(orig);
+ AGSEQ(&(e2->in)) = AGSEQ(orig);
#endif
ED_count(e) = ED_count(orig);
ED_xpenalty(e) = ED_xpenalty(orig);
static int edgeidcmpf(edge_t ** e0, edge_t ** e1)
{
- return (AGID(*e0) - AGID(*e1));
+ return (AGSEQ(*e0) - AGSEQ(*e1));
}
/* following code deals with weights of edges of "virtual" nodes */
len += strlen(agnameof(g)) + strlen(agnameof(h)) + strlen(agnameof(t));
if (len >= BSZ)
sprintf(buf, "_port_%s_%s_%s_%ld", agnameof(g), agnameof(t), agnameof(h),
- (unsigned long)AGID(e));
+ (unsigned long)AGSEQ(e));
else
sprintf(buf, "_port_%s_(%d)_(%d)_%ld",agnameof(g), ND_id(t), ND_id(h),
- (unsigned long)AGID(e));
+ (unsigned long)AGSEQ(e));
return buf;
}
/* set non-diagonal entries */
for (v = agfstnode(g); v; v = agnxtnode(g, v)) {
for (e = agfstedge(g, v); e; e = agnxtedge(g, e, v)) {
- i = AGID(agtail(e));
- j = AGID(aghead(e));
+ i = AGSEQ(agtail(e));
+ j = AGSEQ(aghead(e));
if (i == j)
continue;
/* conductance is 1/resistance */
node_t *gn;
int ind = 0;
for (gn = agfstnode(g); gn; gn = agnxtnode(g, gn)) {
- if(AGID(gn)==AGID(n)) break;
+ if(AGSEQ(gn)==AGSEQ(n)) break;
ind++;
}
/* fprintf(stderr," node=%s, id=%d, ind=%d\n",agnameof(n),n->id,ind); */
for (v = agfstnode(g); v; v = agnxtnode(g, v)) {
for (e = agfstout(g, v); e; e = agnxtout(g, e)) {
- i = AGID(agtail(e));
- j = AGID(aghead(e));
+ i = AGSEQ(agtail(e));
+ j = AGSEQ(aghead(e));
if (i == j)
continue;
GD_dist(g)[i][j] = GD_dist(g)[j][i] = ED_dist(e);
for (e = agfstout(g, n); e; e = agnxtout(g,e)) {
if ((Nop == 2) && ED_spl(e)) continue;
if (Concentrate) {
- int ti = AGID(agtail(e));
- int hi = AGID(aghead(e));
+ int ti = AGSEQ(agtail(e));
+ int hi = AGSEQ(aghead(e));
if (ti <= hi) {
if (isInPS (ps,ti,hi)) continue;
else addPS (ps,ti,hi);
ObjType = "node";
ObjPart = "shape";
ObjFlag = 1;
- ObjId = AGID(obj->u.n);
+ ObjId = AGSEQ(obj->u.n);
#ifndef WITH_CGRAPH
ObjHandle = obj->u.n->handle;
#endif
ObjType = "node";
ObjPart = "label";
ObjFlag = 0;
- ObjId = AGID(obj->u.n);
+ ObjId = AGSEQ(obj->u.n);
#ifndef WITH_CGRAPH
ObjHandle = obj->u.n->handle;
#endif
ObjType = "edge";
ObjPart = "shape";
ObjFlag = 1;
- ObjId = AGID(obj->u.e);
+ ObjId = AGSEQ(obj->u.e);
#ifndef WITH_CGRAPH
ObjHandle = obj->u.e->handle;
#endif
ObjType = "edge";
ObjPart = "label";
ObjFlag = 0;
- ObjId = AGID(obj->u.e);
+ ObjId = AGSEQ(obj->u.e);
#ifndef WITH_CGRAPH
ObjHandle = obj->u.e->handle;
#endif
ObjId = obj->u.sg->meta_node->id;
ObjHandle = obj->u.sg->handle;
#else
- ObjId = AGID(obj->u.sg);
+ ObjId = AGSEQ(obj->u.sg);
#endif
break;
case EMIT_CLABEL:
ObjId = obj->u.sg->meta_node->id;
ObjHandle = obj->u.sg->handle;
#else
- ObjId = AGID(obj->u.sg);
+ ObjId = AGSEQ(obj->u.sg);
#endif
break;
default:
dir = ".";
}
#ifndef WITH_CGRAPH
- sprintf(buf, "%s/node%d.png", dir, AGID(n));
+ sprintf(buf, "%s/node%d.png", dir, AGSEQ(n));
#else
- sprintf(buf, "%s/node%ld.png", dir, AGID(n));
+ sprintf(buf, "%s/node%ld.png", dir, AGSEQ(n));
#endif
return buf;
}
(obj->penwidth), -(obj->penwidth), -(obj->penwidth),
(obj->penwidth), -(obj->penwidth));
gvputs(job, "}\n");
- gvprintf(job, " appearance DEF E%ld Appearance {\n", AGID(e));
+ gvprintf(job, " appearance DEF E%ld Appearance {\n", AGSEQ(e));
gvputs(job, " material Material {\n");
gvputs(job, " ambientIntensity 0.33\n");
gvprintf(job, " diffuseColor %.3f %.3f %.3f\n",
gvputs(job, " ambientIntensity 0.33\n");
gvputs(job, " diffuseColor 1 1 1\n");
gvputs(job, " }\n");
- gvprintf(job, " texture ImageTexture { url \"node%ld.png\" }\n", AGID(n));
+ gvprintf(job, " texture ImageTexture { url \"node%ld.png\" }\n", AGSEQ(n));
gvputs(job, " }\n");
gvputs(job, " geometry Extrusion {\n");
gvputs(job, " crossSection [");
gvputs(job, " Shape {\n");
gvprintf(job, " geometry Cone {bottomRadius %.3f height %.3f }\n",
obj->penwidth * 2.5, obj->penwidth * 10.0);
- gvprintf(job, " appearance USE E%ld\n", AGID(e));
+ gvprintf(job, " appearance USE E%ld\n", AGSEQ(e));
gvputs(job, " }\n");
gvputs(job, " ]\n");
gvputs(job, " }\n");
gvputs(job, " ambientIntensity 0.33\n");
gvputs(job, " diffuseColor 1 1 1\n");
gvputs(job, " }\n");
- gvprintf(job, " texture ImageTexture { url \"node%ld.png\" }\n", AGID(n));
+ gvprintf(job, " texture ImageTexture { url \"node%ld.png\" }\n", AGSEQ(n));
gvputs(job, " }\n");
gvputs(job, " }\n");
gvputs(job, " ]\n");
gvputs(job, " children [\n");
gvputs(job, " Shape {\n");
gvprintf(job, " geometry Sphere {radius %.3f }\n", (double) rx);
- gvprintf(job, " appearance USE E%d\n", AGID(e));
+ gvprintf(job, " appearance USE E%d\n", AGSEQ(e));
gvputs(job, " }\n");
gvputs(job, " ]\n");
gvputs(job, "}\n");