components,
scc,
bcc,
- -- back, cross, forward,
+ -- tree, back, cross, forward,
reachable, path,
module Data.Tree
import Data.Array
import Data.List
+#ifdef __HADDOCK__
+import Prelude
+#endif
+
-------------------------------------------------------------------------
-- -
-- External interface
-- Algorithm 5: Classifying edges
------------------------------------------------------------
+tree :: Bounds -> Forest Vertex -> Graph
+tree bnds ts = buildG bnds (concat (map flat ts))
+ where flat (Node v ts) = [ (v, w) | Node w _us <- ts ] ++ concat (map flat ts)
+
back :: Graph -> Table Int -> Graph
back g post = mapT select g
where select v ws = [ w | w <- ws, post!v < post!w ]
flatten, levels,
) where
+#ifdef __HADDOCK__
+import Prelude
+#endif
+
-- | Multi-way trees, also known as /rose trees/.
data Tree a = Node a (Forest a) -- ^ a value and zero or more child trees.
#ifndef __HADDOCK__