return vector of edge lengths
border edges will be iterated once, non-border edges will be iterated twice