Traverse.Mark
Graph traversal with marking. Only applies to imperative graphs with marks.
module G : GM
val dfs : G.t -> unit
dfs g traverses g in depth-first search, marking all nodes.
dfs g
g
val has_cycle : G.t -> bool
has_cycle g checks for a cycle in g. Modifies the marks. Linear time, constant space.
has_cycle g