A swift based implementation of the Dijkstra algorithm