digraph/vertex.c
/*
 * The change_vertex_weight function takes an origin and destination Vertex* and changes the
 * weight associated with the arc from the origin vertex to the destination vertex to the
 * value of the cost parameter. 
 */
The change_vertex_weight function takes an origin and destination Vertex* and changes the
weight associated with the arc from the origin vertex to the destination vertex to the
value of the cost parameter.
The change_vertex_weight function takes an origin and destination Vertex * and changes the weight associated with the arc from the origin vertex to the destination vertex to the value of the cost parameter .
bool change_vertex_weight(Vertex* origin, Vertex* destination, float cost)
{
	if(origin == NULL || destination == NULL)
		return false;
	LinkedList* list = get_arc_list(origin);
	for(int i = 0; i < linked_list_size(list); i++)
	{
		Arc* arc  = (Arc*) linked_list_get(list, i);
		if(memcmp(arc->vertex, destination, sizeof(destination)) == 0)
		{
			set_arc_weight(arc, cost);
			return true;
		}
	}
	return false;
}
bool change_vertex_weight ( Vertex * origin , Vertex * destination , float cost ) { if ( origin == NULL || destination == NULL ) return false ; LinkedList * list = get_arc_list ( origin ) ; for ( int i = 0 ; i < linked_list_size ( list ) ; i ++ ) { Arc * arc = ( Arc * ) linked_list_get ( list , i ) ; if ( memcmp ( arc -> vertex , destination , sizeof ( destination ) ) == 0 ) { set_arc_weight ( arc , cost ) ; return true ; } } return false ; }
The change_vertex_weight function takes an origin and destination Vertex* and changes the
 weight associated with the arc from the origin vertex to the destination vertex to the
 value of the cost parameter.
The change_vertex_weight function takes an origin and destination Vertex * and changes the weight associated with the arc from the origin vertex to the destination vertex to the value of the cost parameter .
// If this arc's vertex is equal to the destination vertex