Created the constructor for Dijkstra Class