Update shortest_paths.hpp

if ((distance[v] > distance[u] + w) || distance[v] == g.infinity)) in Dijkstra