summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/CycleRemovalGansnerKNV1993.lua
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-04-08 17:23:59 +0000
committerKarl Berry <karl@freefriends.org>2019-04-08 17:23:59 +0000
commit9da8ac113f97e68e91e3a1ef26467f9814eb4312 (patch)
treef36b76c9a982931638dde95501c51072185dec56 /Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/CycleRemovalGansnerKNV1993.lua
parente919fa4b004d0ef401808c337d7def5fa259da0f (diff)
pgf revert to previous release (r49607, committed 5jan19)
git-svn-id: svn://tug.org/texlive/trunk@50867 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/CycleRemovalGansnerKNV1993.lua')
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/CycleRemovalGansnerKNV1993.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/CycleRemovalGansnerKNV1993.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/CycleRemovalGansnerKNV1993.lua
index e52b0d38d1a..b480b7c4e70 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/CycleRemovalGansnerKNV1993.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/CycleRemovalGansnerKNV1993.lua
@@ -23,10 +23,10 @@ function CycleRemovalGansnerKNV1993:run ()
--
-- ignore self-loops
--
- -- merge multiple edges into one edge each, whose weight is the sum of the
+ -- merge multiple edges into one edge each, whose weight is the sum of the
-- individual edge weights
--
- -- ignore leaf nodes that are not part of the user-defined sets (their ranks
+ -- ignore leaf nodes that are not part of the user-defined sets (their ranks
-- are trivially determined)
--
-- ensure that supernodes S_min and S_max are assigned first and last ranks
@@ -36,10 +36,10 @@ function CycleRemovalGansnerKNV1993:run ()
-- ensure the supernodes S_min and S_max are are the only nodes in these ranks
-- for all nodes with indegree of 0, insert temporary edge (S_min, v) with delta=0
-- for all nodes with outdegree of 0, insert temporary edge (v, S_max) with delta=0
-
+
-- classify edges as tree/forward, cross and back edges using a DFS traversal
local tree_or_forward_edges, cross_edges, back_edges = Simplifiers:classifyEdges(self.graph)
-
+
-- reverse the back edges in order to make the graph acyclic
for _,edge in ipairs(back_edges) do
edge.reversed = true