prg_graph_alg_bfs()

Abstract

Performs a breadth-first search on a graph.

Syntax

prg_graph_alg_bfs (graph_ptr, src_vertex_ptr, callback_proc, client_state_ptr)
Argument Type Description
graph_ptr PrgT_Graph * Pointer to the graph to be searched.
src_vertex_ptr PrgT_Graph_Vertex * Pointer to the vertex from which the search will begin.
callback_proc PrgT_Graph_Alg_Bfs_Callback The callback procedure that will be called as each vertex is encountered for the first time. Must not be NIL.
client_state_ptr void * User-defined data that will be passed to the callback procedure each time it is called.

Return Type

void

No return value

prg_graph_alg.h

Details

This function performs a breadth-first search of the given graph, starting from the given source vertex. As each vertex is discovered, the callback procedure is invoked with the given state. The callback procedure must not be NIL.

Note: If the graph contains unconnected vertices, then all vertices will not be visited by a single call of this procedure.

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · Documentation compiled and provided by Beijing ZNetLink Technology Co., Ltd.

交流群 · QQ Group:OPNET/智网妙算网络仿真交流群(群号 486383494)

原文档 © 2017 Riverbed Technology · 本站为公益翻译,由 AI 辅助完成,请仔细甄别

Original documentation © 2017 Riverbed Technology. Community translation, AI-assisted. Contact: jiazequn@znetlink.com