Exemple #1
0
 private PathEdge Reduce(PathEdge e, PathEdge f, int x)
 {
     return(new PathEdge(e.Other(x),
                         f.Other(x),
                         Union(e.xs, f.xs, x),
                         ps[x] + e.ps + f.ps));
 }
Exemple #2
0
        private void Add(PathEdge e)
        {
            int u = e.Either();
            int v = e.Other(u);

            Add(u, v, e);
        }
Exemple #3
0
        /// <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);
            }
        }
Exemple #4
0
 /// <summary>
 /// Create a new reduced edge from two existing edges and vertex they
 /// have in common.
 /// </summary>
 /// <param name="e">an edge</param>
 /// <param name="f">another edge</param>
 /// <param name="x">a common vertex</param>
 public ReducedEdge(PathEdge e, PathEdge f, int x)
     : base(e.Other(x), f.Other(x), e.xs | f.xs | 1L << x)
 {
     this.e = e;
     this.f = f;
 }
Exemple #5
0
 /// <summary>
 /// Create a new reduced edge from two existing edges and vertex they
 /// have in common.
 /// </summary>
 /// <param name="e">an edge</param>
 /// <param name="f">anOther edge</param>
 /// <param name="x">a common vertex</param>
 public ReducedEdge(PathEdge e, PathEdge f, int x)
     : base(e.Other(x), f.Other(x), Union(e.xs, f.xs, x))
 {
     this.e = e;
     this.f = f;
 }