digraph/directed_graph.c
/*
 * The reset_parent_links function changes the parent reference of eac vertex struct
 * within the DirectedGraph* struct to NULL.
 */
The reset_parent_links function changes the parent reference of eac vertex struct
within the DirectedGraph* struct to NULL.
The reset_parent_links function changes the parent reference of eac vertex struct within the DirectedGraph * struct to NULL .
void reset_parent_links(DirectedGraph* graph)
{
	if(graph == NULL)
		return;
	for(int i = 0; i < linked_list_size(graph->vertexList); i++)
	{
		Vertex* v = (Vertex*) linked_list_get(graph->vertexList, i);
		v->parent = NULL;
	}
}
void reset_parent_links ( DirectedGraph * graph ) { if ( graph == NULL ) return ; for ( int i = 0 ; i < linked_list_size ( graph -> vertexList ) ; i ++ ) { Vertex * v = ( Vertex * ) linked_list_get ( graph -> vertexList , i ) ; v -> parent = NULL ; } }
The reset_parent_links function changes the parent reference of eac vertex struct
 within the DirectedGraph* struct to NULL.
The reset_parent_links function changes the parent reference of eac vertex struct within the DirectedGraph * struct to NULL .
// If the graph parameter is NULL, immediately return. // For each vertex in the Directed Graph's vertex list. // Retrieve a reference to the vertex struct at index i. // Assign the vertex's parent reference to NULL.