implemented __eq__ for Vertex and Edge