示例#1
0
        // Show only nodes which can reach the target cluster
        private GraphPresentation ReduceGraph(Cluster targetCluster, RelaxedGraphBuilder builder)
        {
            var presentation = new GraphPresentation();

            presentation.Graph = builder.Graph;

            var algo = new AddRemoveTransitiveHull(presentation);

            algo.Add     = false;
            algo.Reverse = true;
            var mask = algo.Compute(targetCluster.Nodes);

            mask.Invert(presentation);

            presentation.Masks().Push(mask);

            presentation.Masks().Push(new RemoveNodesWithoutSiblings(presentation).Compute());

            return(presentation);
        }