prg_djk_consider_proc_register()
Abstract
Sets a consider procedure callback to allow the user to accept or reject shorter paths as they are found.
Syntax
prg_djk_consider_proc_register (graph_ptr, consider_proc, client_state_ptr)
| Argument | Type | Description |
|---|---|---|
graph_ptr |
PrgT_Graph * |
The graph for which to register the consideration callback. |
consider_proc |
PrgT_Djk_Consider_Proc |
The callback procedure to register. |
client_state_ptr |
void * |
An arbitrary client state passed to the consider_proc callback each time it is called. |
Return Type
void
No return value.
Header
prg_djk.h
Details
This function registers the consideration procedure with the DJK package for a specific graph.
The callback is called every time a shorter or an equal cost path is found to a vertex, when the shortest path algorithm is running. The consider callback evaluates the new path and can either allow the algorithm to consider it and use it, or to ignore it.
The callback prototype is given in PrgT_Djk_Consider_Proc.