[sssp example] only update the vertex value if new distance is smaller