prg_djk_k_paths_compute()

Abstract

Computes the k shortest paths from a source to a destination.

Syntax

prg_djk_k_paths_compute (src_vertex_ptr, dest_vertex_ptr, k_value)
Argument Type Description
src_vertex_ptr PrgT_Graph_Vertex * The source vertex in the paths.
dest_vertex_ptr PrgT_Graph_Vertex * The destination vertex in the paths.
k_value int The number of paths to compute between the source and destination.

Return Type

PrgT_Vector *

Vector of routes where each route is also a PrgT_Vector* of edges. The caller should destroy the vector of routes using prg_vector_destroy (routes_vptr, 1).

prg_djk.h

Details

This function is similar to prg_djk_path_get(), except that several (k) shortest paths are computed. The paths in the route vector are in the order from shortest to longest. If there are multiple equal-cost paths, the order of the equal-cost paths is based on the first found. The paths found by this function are not necessarily node and link disjoint, but will differ from each other by at least one edge.

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