[Olena-patches] r3941: Add a new distance for edges