Fix infinite path in Dijkstra algorithm
This commit is contained in:
1 parent
11200ebed2
commit
c7134e9e91
4 files changed
+14
-7
No files matched your search
@@ -1,5 +1,7 @@
|
||||
package dijkstra;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* This describes a vertex as seen in graphs (see INF101 course).
|
||||
*
|
||||
@@ -10,5 +12,10 @@ public interface VertexInterface {
|
||||
* @return The label of the element.
|
||||
*/
|
||||
public String getLabel() ;
|
||||
|
||||
|
||||
/**
|
||||
* Updates the attribute of the element.
|
||||
* @return The neighbourList of the element.
|
||||
*/
|
||||
public ArrayList<VertexInterface> generateNeighbours();
|
||||
}
|
||||
Reference in new issue
Block a user