Пример #1
0
 public void AddAll(EdgeCollection edgeColl)
 {
     for (IEdgeEnumerator i = edgeColl.GetEnumerator(); i.MoveNext();)
     {
         Add(i.Current);
     }
 }
Пример #2
0
        /// <summary>
        /// Add a set of edges to the graph.  For each edge two DirectedEdges
        /// will be created.  DirectedEdges are NOT linked by this method.
        /// </summary>
        public void AddEdges(EdgeCollection edgesToAdd)
        {
            // create all the nodes for the edges
            for (IEdgeEnumerator it = edgesToAdd.GetEnumerator();
                 it.MoveNext();)
            {
                Edge e = it.Current;

                edges.Add(e);

                DirectedEdge de1 = new DirectedEdge(e, true);
                DirectedEdge de2 = new DirectedEdge(e, false);
                de1.Sym = de2;
                de2.Sym = de1;

                Add(de1);
                Add(de2);
            }
        }
Пример #3
0
 public IEdgeEnumerator Iterator()
 {
     return(edges.GetEnumerator());
 }