Exemple #1
0
        // Constructor from CFGraph
        public DepthSpanningTree(CFGraph cfg)
        {
            visited = new HashSet <CFGNode>();
            Tree    = new BidirectionalGraph <CFGNode, Edge <CFGNode> >();
            Numbers = new Dictionary <CFGNode, int>();

            var root  = cfg.GetRoot();
            int start = 0;

            BuildTree(root, ref start);
        }
Exemple #2
0
        public DepthSpanningTree(CFGraph cfg)
        {
            int numberOfVertices = cfg.NumberOfVertices() - 1;

            visited      = new HashSet <CFGNode>();
            SpanningTree = new BidirectionalGraph <CFGNode, Edge <CFGNode> >();
            Numbers      = new Dictionary <CFGNode, int>();

            var root = cfg.GetRoot();

            BuildTree(root, ref numberOfVertices);
        }