set_edge method in Pin class