public bool removeVertex(Vertex v) { foreach (Edge e in v.incidentEdges()) { edges.Remove(e); } //remove from <vertexId, vertex> structure vertices.Remove(v.getId()); //remove from <floorNum, List<Vertex> structure bool hasLocation = v.getLocation() != null && v.getLocation().getAbsoluteLocation() != null; if (hasLocation) { int floor = (int)v.getLocation().getAbsoluteLocation().getAltitude(); if (verticesByFloor.ContainsKey(floor)) { verticesByFloor[floor].Remove(v); } } return(true); }
public bool removeVertex(Vertex v) { foreach (Edge e in v.incidentEdges()) edges.Remove(e); //remove from <vertexId, vertex> structure vertices.Remove(v.getId()); //remove from <floorNum, List<Vertex> structure bool hasLocation = v.getLocation() != null && v.getLocation().getAbsoluteLocation() != null; if (hasLocation) { int floor = (int)v.getLocation().getAbsoluteLocation().getAltitude(); if (verticesByFloor.ContainsKey(floor)) { verticesByFloor[floor].Remove(v); } } return true; }
public IEnumerable <Edge> incidentEdges(Vertex v) { return(v.incidentEdges()); }
public IEnumerable<Edge> incidentEdges(Vertex v) { return v.incidentEdges(); }