prg_graph_path_vector_to_node_vector_create
Abstract
Creates a vector of nodes for a path specified by a vector of edges.
Syntax
prg_graph_path_vector_to_node_vector_create (edge_vec_ptr, src_ptr, dest_ptr)
| Argument | Type | Description |
|---|---|---|
edge_vec_ptr |
const PrgT_Vector * |
Vector of edges for the path of interest. |
src_ptr |
PrgT_Graph_Vertex * |
Source node of the path. |
dst_ptr |
PrgT_Graph_Vertex * |
Destination node of the path. (Optional; PRGC_NIL if not specified) |
Return Type
PrgT_Vector *
Vector of pointers to nodes on the given path, or PRGC_NIL if any argument was invalid.
Header
prg_graph.h
Details
The returned vector contains all nodes of the path, starting from the source node and ending at the destination node. If any input is invalid, the return value is PRGC_NIL and the vector of nodes is not created. The caller is responsible for destroying the vector of nodes when it is no longer needed.