prg_edge_id_get()

Abstract

Gets the ID of an edge.

Syntax

prg_graph_id_get (edge_ptr)
Argument Type Description
edge_ptr PrgT_Graph_Edge * The edge of interest

Return Type

unsigned long

Requested ID.

prg_graph.h

Details

This function returns an integer ID that was assigned to the edge when the edge was created. You can use this ID to sort edges in a deterministic way (for example, to guarantee that there are no duplicates in a list).

Each edge in a given graph has a unique ID. The edge IDs are not globally unique across all graphs. When a graph is copied using prg_graph_copy(), the edge IDs are copied and preserved in the copy graph. The IDs are not guaranteed to be the same as the index into the vector of edges returned from prg_graph_edge_all_get() (that is, the IDs are unique, but they are not guaranteed to be in the range [0, num_edges - 1]).

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