summaryrefslogtreecommitdiff
path: root/Source/Graph/Graph.cs
diff options
context:
space:
mode:
authorGravatar Unknown <akashl@MSRI-Akashlal.fareast.corp.microsoft.com>2011-06-26 23:38:29 +0530
committerGravatar Unknown <akashl@MSRI-Akashlal.fareast.corp.microsoft.com>2011-06-26 23:38:29 +0530
commitd283f9908449854ff4edd36dd7fa820cd194323e (patch)
tree8e8cc2df264b3952bd7b50149e8ca516b2a6eb66 /Source/Graph/Graph.cs
parent6b33346bf50caac9bdb33405b31b19574a091ef1 (diff)
Call PostOrderVisitIterative by default
Diffstat (limited to 'Source/Graph/Graph.cs')
-rw-r--r--Source/Graph/Graph.cs8
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/Graph/Graph.cs b/Source/Graph/Graph.cs
index 120cb8f8..99df97cd 100644
--- a/Source/Graph/Graph.cs
+++ b/Source/Graph/Graph.cs
@@ -184,11 +184,11 @@ namespace Graphing {
int n = this.graph.Nodes.Count;
this.postOrderNumberToNode = new Maybe<Node>[n + 1];
this.nodeToPostOrderNumber = new Dictionary<Node, int>();
- HashSet<Node> visited = new HashSet<Node>();
- int currentNumber = 1;
+ //HashSet<Node> visited = new HashSet<Node>();
+ //int currentNumber = 1;
Contract.Assume(this.source != null);
- this.PostOrderVisit(this.source, visited, ref currentNumber);
- //this.PostOrderVisitIterative(this.source);
+ //this.PostOrderVisit(this.source, visited, ref currentNumber);
+ this.PostOrderVisitIterative(this.source);
this.sourceNum = this.nodeToPostOrderNumber[source];
// for (int i = 1; i <= n; i++){ Console.WriteLine(postOrderNumberToNode[i]); }
this.doms = new int[n + 1]; // 0 is unused: means undefined