Added a clear method to Dijkstra