// // 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)); }
public Edge(Edge e) { from = e.from; to = e.to; weight = e.weight; reversed = e.reversed; hyperedge = e.hyperedge; }
public Edge(int f, int t, int w, bool rev, Hypergraph.HyperEdge he) { from = f; to = t; weight = w; reversed = rev; hyperedge = he; }
public Edge(Edge e) { from = e.from; to = e.to; weight = e.weight; reversed = e.reversed; hyperedge = e.hyperedge; } // copy constructor