EpForceDirectedGraph.cs.Graph.RemoveEdge C# (CSharp) Method

RemoveEdge() public method

public RemoveEdge ( Edge iEdge ) : void
iEdge Edge
return void
        public void RemoveEdge(Edge iEdge)
        {
            edges.Remove(iEdge);
            foreach (KeyValuePair<string, Dictionary<string, List<Edge>>> x in m_adjacencySet)
            {
                foreach (KeyValuePair<string, List<Edge>> y in x.Value)
                {
                    List<Edge> tEdges = y.Value;
                    tEdges.Remove(iEdge);
                    if (tEdges.Count == 0)
                    {
                        m_adjacencySet[x.Key].Remove(y.Key);
                        break;
                    }
                }
                if (x.Value.Count == 0)
                {
                    m_adjacencySet.Remove(x.Key);
                    break;
                }
            }
            notify();
        }