Add "weight" notion to each edge.