removeVertex static method

void removeVertex(
  1. Vertex v,
  2. List<Vertex> vertices
)

Implementation

static void removeVertex(Vertex v,List<Vertex> vertices ) {
  while ( v.neighbors.isNotEmpty ) {
    final n = v.neighbors.removeLast();
    removeFromArray( n.neighbors, v );
  }

  removeFromArray( vertices, v );
}