Example #1
0
        //
        // Adds the specified edge to the graph; if the List does not exist, we create it and add the Edge
        //
        public void AddEdge(int u, int v, int weight, bool rev, Hypergraph.HyperEdge hyperedge)
        {
            // create the list, if needed
            if (vertexList[u] == null)
            {
                vertexList[u] = new List <Edge>();
            }

            // Do not allow duplicate edges
            Utilities.AddUnique <Edge>(vertexList[u], new Edge(u, v, weight, rev, hyperedge));
        }
Example #2
0
 public Edge(Edge e)
 {
     from = e.from; to = e.to; weight = e.weight; reversed = e.reversed; hyperedge = e.hyperedge;
 }
Example #3
0
 public Edge(int f, int t, int w, bool rev, Hypergraph.HyperEdge he)
 {
     from = f; to = t; weight = w; reversed = rev; hyperedge = he;
 }
Example #4
0
 public Edge(Edge e)
 {
     from = e.from; to = e.to; weight = e.weight; reversed = e.reversed; hyperedge = e.hyperedge;
 }                                                                                                                        // copy constructor
Example #5
0
 public Edge(int f, int t, int w, bool rev, Hypergraph.HyperEdge he)
 {
     from = f; to = t; weight = w; reversed = rev; hyperedge = he;
 }