prg_djk_all_sources_compute()

Abstract

Runs Dijkstra's shortest path algorithm for all vertices in a graph and builds up routing tables on every vertex in the graph.

Syntax

prg_djk_all_sources_compute (graph_ptr)
Argument Type Description
graph_ptr PrgT_Graph * The graph on which to run the all pairs shortest path algorithm.

Return Type

PrgT_Compcode

PrgC_Compcode_Success if the routing tables are build on every vertex in the graph, PrgC_Compcode_Failure otherwise.

prg_djk.h

Details

Performs prg_djk_single_source_compute() on every vertex in the graph. If some vertices had the routing table built, the function will not re-build the table, but just use the result.

With this function it is possible to find the shortest path from every source to every destination because the routing table now exists on every vertex.

Calling the function more than once will not recompute the routing tables. If you wish to recompute, in cases where the graph was changed, call prg_djk_graph_init() to re-initialize the graph.

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · 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