fixed computing of shortest path's weight for Floyd-Warshall algorithm for edges having weight != 1.0