removeEdge abstract method
- Edge<
V> edge
Removes an edge
from source
to target
with a weight
to the graph.
Returns the weight of the edge, or null
if the edge was not present.
If the edge was removed, the graph must:
- Remove the edge from the graph so that containsEdge returns
false
; - Remove
target
as a successor ofsource
in successors; - If
source
has no more successors, returnfalse
for containsRoot;
In addition, the graph may, depending on the implementation:
- Remove
source
andtarget
from the graph if they have no more edges; - Remove the inverse edge, i.e. for undirected graphs.
Implementation
double? removeEdge(Edge<V> edge);