it seems finds edges correctly; added float dist(const Vertex& v1,const Vertex& v2);