Skip to content
Snippets Groups Projects
Commit 01d213b5 authored by Rodrigo Mesquita's avatar Rodrigo Mesquita :seedling: Committed by Marge Bot
Browse files

Improve haddock of graphReachabilityCyclic

parent 03851b64
No related branches found
No related tags found
No related merge requests found
...@@ -51,6 +51,9 @@ graphReachability (Graph g from to) = ...@@ -51,6 +51,9 @@ graphReachability (Graph g from to) =
do_one v = IS.unions (IS.fromList (g ! v) : mapMaybe (flip IM.lookup reachableGraph) (g ! v)) do_one v = IS.unions (IS.fromList (g ! v) : mapMaybe (flip IM.lookup reachableGraph) (g ! v))
-- | Construct a 'ReachabilityIndex' from a 'Graph' which may have cycles. -- | Construct a 'ReachabilityIndex' from a 'Graph' which may have cycles.
-- If this reachability index is just going to be used once, it may make sense
-- to use 'reachablesG' instead, which will traverse the reachable nodes without
-- constructing the index -- which may be faster.
cyclicGraphReachability :: Graph node -> ReachabilityIndex node cyclicGraphReachability :: Graph node -> ReachabilityIndex node
cyclicGraphReachability (Graph g from to) = cyclicGraphReachability (Graph g from to) =
ReachabilityIndex{index = reachableGraphCyclic, from_vertex = from, to_vertex = to} ReachabilityIndex{index = reachableGraphCyclic, from_vertex = from, to_vertex = to}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment