removeEdges method
Removes edges pointing from vertex
to connectedVertices
.
Does not remove any vertices from the graph.
Implementation
void removeEdges(T vertex, Set<T> connectedVertices) {
// Return early if vertex does not belong to the graph.
if (!_edges.containsKey(vertex)) return;
_edges[vertex]?.removeWhere(
(connectedVertex, edgeWeight) => connectedVertices.contains(
connectedVertex,
),
);
updateCache();
}