Added check on edges weights (0 <= w <= 1)