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