Edge and Vertex Suppression and Weight Changes
If a graph evolves by changing edge weights or by removing vertices and edges from consideration, the DJK package can account for these changes without rebuilding the graph cache. This is faster than starting from scratch. Any of the following functions can be called between successive calls to prg_djk_path_get().
Note: These functions should not be used between a *_source_compute() and a prg_djk_path_get() call.
prg_djk_edge_weight_set()— alter the weight of an edge.prg_djk_edge_disable()— don't allow edge in shortest-path solution.prg_djk_vertex_disable()— don't allow vertex in shortest-path solution.prg_djk_edge_enable()— allow edge in shortest-path solutionprg_djk_vertex_enable()— allow edge in shortest-path solution
These functions mark an edge or vertex as forbidden from or permitted in paths. These calls are less expensive than fully removing or restoring an edge or vertex, because they are compatible with the graph cache. Changes persist until the next prg_djk_graph_init() call.