removeIncomingEdges method

void removeIncomingEdges(
  1. Vertex<T> vertex
)

Removes edges ending at vertex from the graph.

Implementation

void removeIncomingEdges(Vertex<T> vertex) {
  // Remove incoming edges
  for (final startVertex in _edges.keys ?? []) {
    _edges[startVertex].removeWhere((item) => item == vertex);
  }
}