private void Add(PathEdge e) { int u = e.Either(); int v = e.Other(u); Add(u, v, e); }
/// <summary> /// Add a path-edge to the path-graph. Edges are only added to the vertex of /// lowest rank (see. constructor). /// </summary> /// <param name="edge">path edge</param> private void Add(PathEdge edge) { int u = edge.Either(); int v = edge.Other(u); if (rank[u] < rank[v]) { graph[u].Add(edge); } else { graph[v].Add(edge); } }