prg_djk_predecessor_selection_proc_register()
Abstract
Registers the predecessor selection procedure for a specific graph.
Syntax
prg_djk_predecessor_selection_proc_register (graph_ptr, pred_selection_proc, client_state_ptr)
| Argument | Type | Description |
|---|---|---|
graph_ptr |
PrgT_Graph * |
The graph for which to register the predecessor selection callback. |
pred_selection_proc |
PrgT_Djk_Predecessor_Selection_Proc |
The callback procedure to register. |
client_state_ptr |
void * |
Client-managed data that is passed to the pred_selection_proc callback each time it is called. |
Return Type
void
No return value.
Header
prg_djk.h
Details
The predecessor selection procedure is used in the shortest path algorithm to limit the set of equal-cost shortest paths to a single shortest path. The selection procedure is passed a set of candidate predecessor edges and it returns the edge to select. This gives the client code more control than just using the PRGC_DJK_PATH_GET_OPT_FIRST_FOUND option.
Note: The PRGC_DJK_PATH_GET_OPT_FIRST_FOUND option takes precedence over the predecessor selection procedure.
The callback prototype is given in PrgT_Djk_Predecessor_Selection_Proc.