public DijkstraAnimation(Canvas c)
     : base()
 {
     popped = new Nodes();
     pushing = new Nodes();
     incomingEdge = new Hashtable();
     proposedWeight = new Hashtable();
     pq = new BinaryPriorityQueue(Node.sortAscending());
     graph = new Graph(); //empty graph until initialized.
     this.c = c;
     t = new Thread(new ThreadStart(Run));
 }
示例#2
0
 static void Main()
 {
     Canvas c = new Canvas();
     c.AddAnimation(new DijkstraAnimation(c));
     Application.Run(c);
 }