Dijkstra algorithm works with directed graphs with non-integer edge weights