QuickGraph icon indicating copy to clipboard operation
QuickGraph copied to clipboard

Transitive Reduction: standalone vertices are being removed from the graph

Open nicolas-2008 opened this issue 5 years ago • 1 comments

TransitiveReduction has an issue working with graph which contains not linked vertices.

            var graph = new BidirectionalGraph<string, Edge<string>>();
            graph.AddVertex("/test");
            graph.AddVertex("/test/123");
            graph.AddVertex("/test/notlinked");
            graph.AddEdge(new Edge<string>("/test", "/test/123"));

            var reduced = graph.ComputeTransitiveReduction();

Only two vertices are left in reduced graph.

nicolas-2008 avatar Dec 07 '19 16:12 nicolas-2008

I made a fix for this in my fork of the library (with also a lot of others fixes and .NET Core compliance). It is available in latest release (after this commit).

KeRNeLith avatar Jan 19 '20 23:01 KeRNeLith