prg_djk_edge_weight_set()
Abstract
Sets the weight of an edge in a graph
Syntax
prg_djk_edge_weight_set (edge_ptr, weight)
| Argument | Type | Description |
|---|---|---|
edge_ptr |
PrgT_Graph_Edge * |
The edge of interest. |
weight |
double |
The weight that is going to be set on the edge. |
Return Type
PrgT_Compcode
PrgC_Compcode_Success if the operation succeeds; PrgC_Compcode_Failure otherwise.
Header
prg_djk.h
Details
Given an edge in the graph, the function sets the weight of the edge. The weight is used in the computation of the shortest path between vertices in the graph.
The cost to traverse an edge will be equal to the weight that is set on the edge.