PrgT_Djk_Path_Consider_Proc
Abstract
Callback: Used to determine if a proposed working path should be used as the new shortest path.
Syntax
PrgT_Djk_Path_Consider_Proc (vertex_from_ptr, vertex_to_ptr, edge_ptr, old_val, new_val, path_info_ptr, client_state_ptr)
| Argument | Type | Description |
|---|---|---|
vertex_from_ptr |
PrgT_Graph_Vertex * |
The source vertex. |
vertex_to_ptr |
PrgT_Graph_Vertex * |
The vertex that the partial path is leading to. |
edge_ptr |
PrgT_Graph_Edge * |
The proposed edge hop leading to vertex_to_ptr. |
old_val |
double |
The old cost of getting to vertex_to_ptr. |
new_val |
double |
The new cost to get to vertex_to_ptr. |
path_info_ptr |
PrgT_Djk_Path_Info * |
The partial path information to get from the source vertex to the parent vertex. The full partial path is obtained from path_info_ptr + edge_ptr. |
client_state_ptr |
void * |
The client state passed to the callback. |
Return Type
PrgT_Djk_Consider_Result
PrgC_Djk_Consider_Accept if the new path is accepted, PrgC_Djk_Consider_Ignore if the old value continues to be used.
Header
prg_djk.h
Details
This function is called whenever a path or partial path is under consideration to be the working shortest path. It can be used to evaluate whether the path is legal. The path consider procedure has access to all of the hops in the working path and the client state in order to make the decision.
This function is registered by prg_djk_path_consider_proc_register().