removeIncomingEdges method

void removeIncomingEdges(
  1. T vertex
)

Removes edges ending at vertex from the graph.

Note: Does not remove any vertices from the graph.

Implementation

void removeIncomingEdges(T vertex) {
  // Return early if vertex is unknown.
  if (!_edges.containsKey(vertex)) return;
  for (final connectedVertices in _edges.values) {
    connectedVertices.remove(vertex);
  }
  updateCache();
}