prg_djk_graph_init()
Abstract
Attaches the DJK state to the graph and allows the shortest path computations to be performed.
Syntax
prg_djk_graph_init (graph_ptr)
| Argument | Type | Description |
|---|---|---|
graph_ptr |
PrgT_Graph * |
The graph that will be initialized with the DJK state. |
Return Type
PrgT_Compcode
PrgC_Compcode_Success if initialization succeeds; PrgC_Compcode_Failure otherwise.
Header
prg_djk.h
Details
Initializes and attaches the DJK state (required state to run the shortest path algorithms) to the graph. This includes the graph itself as well as the vertices and edges.
To use the DJK package functions on the graph, prg_djk_graph_init() must be called first. In addition, if you add edges or vertices to the graph after the initial call to init, you must call it again to make sure that all the necessary states are initialized. This will add the DJK state to all the newly added elements of the graph.