// 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); }
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); }