Exemple #1
0
        /// <inheritdoc />
        protected override void InternalCompute()
        {
            // Clone the visited graph
            TransitiveClosure.AddVerticesAndEdgeRange(VisitedGraph.Edges);

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

            algorithmHelper.InternalCompute((graph, u, v, edge) =>
            {
                if (edge == null)
                {
                    graph.AddEdge(_createEdge(u, v));
                }
            });
        }
Exemple #2
0
        /// <inheritdoc />
        protected override void InternalCompute()
        {
            // Clone the visited graph
            TransitiveReduction.AddVerticesAndEdgeRange(VisitedGraph.Edges);

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

            algorithmHelper.InternalCompute((graph, u, v, edge) =>
            {
                if (edge != null)
                {
                    graph.RemoveEdge(edge);
                }
            });
        }