removeEdge abstract method
- Edge<
E> edge
Removes an edge from the graph.
If the edge was removed, the graph must:
- Remove the edge from the graph so that containsEdge returns
false; - Remove
targetas a successor ofsourcein successors; - If
sourcehas no more successors, returnfalsefor containsRoot;
In addition, the graph may, depending on the implementation:
- Remove
sourceandtargetfrom the graph if they have no more edges; - Remove the inverse edge, i.e. for undirected graphs.
Implementation
void removeEdge(Edge<E> edge);