Name

graph_rem_edge

Synopsis

int graph_rem_edge(Graph *graph, const void *data1, void **data2);

Return Value

0 if removing the edge is successful, or -1 otherwise.

Description

Removes the edge from data1 to data2 in the graph specified by graph . Upon return, data2 points to the data stored in the adjacency list of the vertex specified by data1. It is the responsibility of the caller to manage the storage associated with the data.

Complexity

O (V ), where V is the number of vertices in the graph.

Get Mastering Algorithms with C now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.