Return predecessor subgraph
Add dijkstra()
Refactor the templates