prg_djk_graph_cache_enable()

Abstract

Enables graph caching for faster DJK performance.

Syntax

prg_djk_graph_cache_enable (graph_ptr)
Argument Type Description
graph_ptr PrgT_Graph * The graph that has the DJK package initialized on it, and that will be used for all future shortest-path finding.

Return Type

void

No return value.

prg_djk.h

Details

The DJK package calculates shortest paths by first converting its associated graph into internal data structures for efficient calculation. This conversion of the graph is done for each call to find shortest paths since the DJK package does not know whether or not the graph changed since the last graph was evaluated, which can be wasteful if the graph does not change from call to call.

Calling this function enables caching the internal data structure representation of the graph, which can speed up the finding of shortest paths if the same graph is used in multiple invocations of prg_djk_path_get(). The caller should call this function once, before any prg_djk_path_get() calls are made. Then, as long as the graph topology does not change, the caller can invoke prg_djk_path_get() as many times as needed, and then call prg_djk_graph_cache_disable() when done.

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