Exemplo n.º 1
0
        /// <inheritdoc />
        protected override void InternalCompute()
        {
            // Clone the visited graph
            TransitiveReduction.AddVertexRange(VisitedGraph.Vertices);
            TransitiveReduction.AddEdgeRange(VisitedGraph.Edges);

            var algorithmHelper = new TransitiveAlgorithmHelper <TVertex, TEdge>(TransitiveReduction);

            algorithmHelper.InternalCompute((graph, u, v, found, edge) =>
            {
                if (found)
                {
                    graph.RemoveEdge(edge);
                }
            });
        }
Exemplo n.º 2
0
        /// <inheritdoc />
        protected override void InternalCompute()
        {
            // Clone the visited graph
            TransitiveClosure.AddVertexRange(VisitedGraph.Vertices);
            TransitiveClosure.AddEdgeRange(VisitedGraph.Edges);

            var algorithmHelper = new TransitiveAlgorithmHelper <TVertex, TEdge>(TransitiveClosure);

            algorithmHelper.InternalCompute((graph, u, v, found, edge) =>
            {
                if (!found)
                {
                    graph.AddEdge(_createEdge(u, v));
                }
            });
        }