Edge::Edge(Vertex& v1, Vertex& v2, mpf_class cost) : v1(v1), v2(v2), cost(cost) { v1.add_neighbor(v2.getId(), cost); v2.add_neighbor(v1.getId(), cost); }