Added Pi class. Modified Dijsktra and fixed Maze class.
This commit is contained in:
1 parent
acab098ea1
commit
3b674f6049
3 files changed
+23
-1
No files matched your search
@@ -42,4 +42,5 @@ public class Dijkstra {
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package dijkstra;
|
||||
|
||||
import java.util.Hashtable;
|
||||
|
||||
public class Pi implements PiInterface {
|
||||
|
||||
private Hashtable<VertexInterface, Integer> hashPi = new Hashtable<VertexInterface, Integer>() ;
|
||||
|
||||
public int getPi(VertexInterface vertex) {
|
||||
|
||||
return hashPi.get(vertex) ;
|
||||
|
||||
}
|
||||
|
||||
public void setPi(int i, VertexInterface vertex) {
|
||||
|
||||
hashPi.put(vertex, i) ;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user