Functor Traverse.Mark

module Mark: 
functor (G : GM) -> sig .. end

Graph traversal with marking. Only applies to imperative graphs with marks.

Parameters:
G : GM

val dfs : Traverse.G.t -> unit

dfs g traverses g in depth-first search, marking all nodes.

val has_cycle : Traverse.G.t -> bool

has_cycle g checks for a cycle in g. Modifies the marks. Linear time, constant space.