digraph/directed_graph.c
/*
 * The add arc function takes a DirectedGraph* struct pointer, a void* pointer to 
 * the origin vertex, a void* pointer to the destination vertex, and a float value
 * representing the weight of the arc. The function then creates an arc from the
 * origin vertex to the destination vertex with the appropriate weight assigned.
 * This function returns true if the arc between origin and destination was added
 * to the Directed Graph struct successfully, otherwise false is returned.
 */
The add arc function takes a DirectedGraph* struct pointer, a void* pointer to
the origin vertex, a void* pointer to the destination vertex, and a float value
representing the weight of the arc. The function then creates an arc from the
origin vertex to the destination vertex with the appropriate weight assigned.
This function returns true if the arc between origin and destination was added
to the Directed Graph struct successfully, otherwise false is returned.
The add arc function takes a DirectedGraph * struct pointer a void * pointer to the origin vertex a void * pointer to the destination vertex and a float value representing the weight of the arc . The function then creates an arc from the origin vertex to the destination vertex with the appropriate weight assigned . This function returns true if the arc between origin and destination was added to the Directed Graph struct successfully otherwise false is returned .
bool add_arc(DirectedGraph* graph, void* origin, void* destination, float cost)
{
	if(graph == NULL || origin == NULL || destination == NULL)
		return false;
	Vertex* start = get_vertex(graph, origin);
	Vertex* end   = get_vertex(graph, destination);
	return add_vertex_arc(start, end, cost);
}
bool add_arc ( DirectedGraph * graph , void * origin , void * destination , float cost ) { if ( graph == NULL || origin == NULL || destination == NULL ) return false ; Vertex * start = get_vertex ( graph , origin ) ; Vertex * end = get_vertex ( graph , destination ) ; return add_vertex_arc ( start , end , cost ) ; }
The add arc function takes a DirectedGraph* struct pointer, a void* pointer to
 the origin vertex, a void* pointer to the destination vertex, and a float value
 representing the weight of the arc.
The add arc function takes a DirectedGraph * struct pointer a void * pointer to the origin vertex a void * pointer to the destination vertex and a float value representing the weight of the arc .
// If any one of the graph, origin, or destination parameter is NULL, return false. // Otherwise retrieve the Vertices associated with the origin and destination parameters. // Return the call to add vertex arc function with the two vertices and the arc weight.