package ocamlgraph

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Traverse.BfsSource

Breadth-first search

Parameters

module G : G

Signature

Classical big-step iterators

Sourceval iter : (G.V.t -> unit) -> G.t -> unit

The function is applied each time a node is reached for the first time. Not tail-recursive.

Sourceval iter_component : (G.V.t -> unit) -> G.t -> G.V.t -> unit

Idem, but limited to a single root vertex.

Classical folds

Sourceval fold : (G.V.t -> 'a -> 'a) -> 'a -> G.t -> 'a

The function is applied each time a node is reached for the first time. Not tail-recursive.

Sourceval fold_component : (G.V.t -> 'a -> 'a) -> 'a -> G.t -> G.V.t -> 'a

Idem, but limited to a single root vertex.

With the distance to the source

Sourceval fold_component_dist : (G.V.t -> int -> 'a -> 'a) -> 'a -> G.t -> G.V.t -> 'a
Sourceval iter_component_dist : (G.V.t -> int -> unit) -> G.t -> G.V.t -> unit

Step-by-step iterator

See module Dfs

Sourcetype iterator
Sourceval start : G.t -> iterator
Sourceval step : iterator -> iterator
Sourceval get : iterator -> G.V.t
OCaml

Innovation. Community. Security.