(index ("graph-bfs-foreach" 0) ("graph-bfs-fold" 714) ("graph-bfs-dist" 1775))
(def (sig (procedure "graph-bfs-foreach:: G FNODE FEDGE ROOTS -> UNDEFINED" (id graph-bfs-foreach))) (p "Breadth-first search iterator; given a list of initial nodes, " (tt "ROOTS") ", the successors of each initial node are visited in breadth-first search order, and procedures " (tt "FNODE") " and " (tt "FEDGE") " are applied to each node or edge, respectively, as the graph is traversed. " (tt "FNODE") " is of the form " (tt "LAMBDA N -> _") " where " (tt "N") " is node number; and " (tt "FEDGE") " is of the form " (tt "LAMBDA EDGE") " where " (tt "EDGE") " is a list of the form " (tt "(I J INFO)") "; " (tt "I") " and " (tt "J") " are the nodes defining the edge, and " (tt "INFO") " is edge metadata."))
(def (sig (procedure "graph-bfs-fold:: G FNODE FEDGE ROOTS NODE-INIT EDGE-INIT -> NODE-STATE EDGE-STATE" (id graph-bfs-fold))) (p "Breadth-first search iterator with state; given a list of initial nodes, " (tt "ROOTS") ", and initial node state and edge state, " (tt "NODE-INIT") " and " (tt "EDGE-INIT") " the successors of each initial node are visited in breadth-first search order, and procedures " (tt "FNODE") " and " (tt "FEDGE") " are applied to each node and the node state, or edge and the edge state, respectively, as the graph is traversed. " (tt "FNODE") " is of the form " (tt "LAMBDA N NODE-STATE -> NODE-STATE") " where " (tt "N") " is node number, and NODE-STATE can be of arbitrary type and must of the same type as " (tt "NODE-INIT") ". " (tt "FEDGE") " is of the form " (tt "LAMBDA EDGE EDGE-STATE") " where " (tt "EDGE") " is a list of the form " (tt "(I J INFO)") "; " (tt "I") " and " (tt "J") " are the nodes defining the edge, and " (tt "INFO") " is edge metadata; " (tt "EDGE-STATE") " must be of the same type as " (tt "EDGE-INIT")))
(def (sig (procedure "graph-bfs-dist:: G ROOTS -> S32VECTOR * MAX-DIST" (id graph-bfs-dist))) (p "Breadth-first search distance; this procedure computes BFS maximum distance from a root node for all successors of the given initial nodes, and the maximum distance from root across all nodes traversed. The node distances are returned in an SRFI-4 vector of type " (tt "S32VECTOR") " and " (tt "MAX-DIST") " is the maximum distance computed."))
