prg_djk_path_get_hop_limit()

Abstract

Returns a vector of size-limited shortest paths from the source to the destination vertex.

Syntax

prg_djk_path_get_hop_limit (src_vertex_ptr, dest_vertex_ptr, hop_limit, options)
Argument Type Description
src_vertex_ptr PrgT_Graph_Vertex * A source vertex of the path.
dest_vertex_ptr PrgT_Graph_Vertex * A destination vertex of the path.
hop_limit int Maximum number of hops to allow in a path, or PRGC_DJK_OPT_NO_HOP_LIMIT to include all hops in each path.
options int Option flags (see the Details for prg_djk_path_get_options() for possible values).

Return Type

PrgT_Vector *

Returns the vector of shortest path routes, where each route is also a PrgT_Vector* of edges. The route vectors contain the sequence of PrgT_Graph_Edge objects in the route from the source to the destination.

prg_djk.h

Details

This function works similarly to prg_djk_path_get_options(), except that the number of hops in each path is limited to hop_limit. Each edge in the path is a hop; thus, if the hop constraint is k, there are at most k edges in the path.

It is the caller's responsibility to deallocate the return value when it is not needed, by using a call to prg_vector_destroy():

	prg_vector_destroy (routes_vptr, 1).

All paths within the vector will be deallocated when the main vector is deallocated.

The path consists of PrgT_Graph_Edge* elements. The vector of PrgT_Graph_Edge* elements makes up a single path.

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