Dijkstra and friends algorithms in a single package! :3