Commit 8424551b authored by Tanmim Hanifa's avatar Tanmim Hanifa
Browse files

final commit

parent 5133693a
......@@ -10,7 +10,7 @@ public class Greedy : Pathfinder {
private PriorityQueue frontier;
private Dictionary<Node, Node> previous;
private Dictionary<Node, int> cost;
private Dictionary<Node, Node> visitedFrom;
private Dictionary<Node, int> visitedFrom;
public void SetGraph(Graph g) {
graph = g;
......@@ -54,9 +54,9 @@ public class Greedy : Pathfinder {
bool found = false;
Node start;
visitedFrom = new Dictionary<Node, Node>();
visitedFrom = new Dictionary<Node, int>();
frontier.Enqueue(start, 0);
visitedFrom[start];
visitedFrom[start] = -1;
while(frontier.Count > 0){
Node current = frontier.Dequeue();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment