From: Emden Gansner Date: Wed, 21 Oct 2015 18:16:33 +0000 (-0400) Subject: Fix script to avoid loops and store multiple edge count in multiplicity rather than... X-Git-Tag: TRAVIS_CI_BUILD_EXPERIMENTAL~98 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6d2de60c9dd58104ecaecd6b37917e70da5574f5;p=graphviz Fix script to avoid loops and store multiple edge count in multiplicity rather than weight. --- diff --git a/cmd/gvpr/lib/binduce b/cmd/gvpr/lib/binduce index c644f7b19..847a905e0 100644 --- a/cmd/gvpr/lib/binduce +++ b/cmd/gvpr/lib/binduce @@ -29,7 +29,7 @@ N[aget($,aname)==value] { else if ($G.directed && (e = isEdge(nbrs[i+1],nbrs[i],""))) { wt[e] += 1; } - else { + else if (nbrs[i] != nbrs[i+1]) { // avoid loops e = edge(nbrs[i],nbrs[i+1],""); wt[e] = 1; } @@ -40,6 +40,6 @@ N[aget($,aname)==value] { } END_G{ for (wt[e]) { - e.weight = sprintf ("%d", wt[e]); + e.multiplicity = sprintf ("%d", wt[e]); } }