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.
Header
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]).