# graph-breadth-first-search.api
# Breadth first search.
#
# -- Allen Leung
# Compiled by:
#
src/lib/graph/graphs.lib### "I was seldom able to see an opportunity
### until it had ceased to be one."
###
### -- Mark Twain's Autobiography
stipulate
package odg = oop_digraph; # oop_digraph is from
src/lib/graph/oop-digraph.pkg package rwv = rw_vector; # rw_vector is from
src/lib/std/src/rw-vector.pkgherein
api Graph_Breadth_First_Search {
#
# Breadth first search.
bfs: odg::Digraph (N,E,G) # Here N,E,G stand stead for the types of client-package-supplied records associated with (respectively) nodes, edges and graphs.
-> (odg::Node_Id -> Void)
-> (odg::Edge(E) -> Void)
-> List( odg::Node_Id )
-> Void;
bfsdist: odg::Digraph (N,E,G)
-> List( odg::Node_Id )
-> rwv::Rw_Vector( Int );
};
end;