Module Traversal.Bfs.T

module T: Traversal.Traversal(A)

type visit_info = {
   nb : int;
   dist : int;
   parent : int;
}
type t = {
   visit : visit_info Traversal.A.t;
   mutable n : int;
}
val non_vertex : int
val visit_nb : t -> int -> int
val visited : t -> int -> bool
Has vertex been visited.
val parent : t -> int -> int
val dist : t -> int -> int
Distance from root.
val nb_visited : t -> int
val nb_nodes : t -> int
Total number of nodes (including non-visited nodes).
exception Found of int
val last_visited : t -> int
val order : t -> int Traversal.A.t
Visited nodes in traversal order.
val iter_path : (int -> 'a) -> t -> int -> int -> unit
Iterate on u, parent(u), ..., v if v is ancestor of u, and up to the root of the tree containing u otherwise.
val fold_path : (int -> 'a -> 'a) -> t -> int -> int -> 'a -> 'a
val path_rev : t -> int -> int -> int list
val path : t -> int -> int -> int list
val make : int -> t
val set : t -> int -> int -> int -> int -> unit