Opened 9 years ago

Last modified 5 years ago

#9807 new defect

merge_vertices behavior in a graph with loops

Reported by: tobiasljohnson Owned by: jason, ncohen, rlm
Priority: minor Milestone: sage-6.4
Component: graph theory Keywords: merge_vertices, loops
Cc: brunellus Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description

Suppose G is a graph with loops permitted containing the edge (0, 1). I would expect that G.merge_vertices([0, 1]) would create a loop (0, 0), but it doesn't:

sage: G = Graph(loops = True)
sage: G.add_edge(0, 1)
sage: G.merge_vertices([0, 1])
sage: G.edges()
[]

I think either we should change this, or we should write explicitly in the documentation that merge_vertices doesn't create self-loops even when G allows them.

Change History (6)

comment:1 Changed 8 years ago by brunellus

  • Cc brunellus added

comment:2 Changed 8 years ago by brunellus

See #7304.

comment:3 Changed 6 years ago by jdemeyer

  • Milestone changed from sage-5.11 to sage-5.12

comment:4 Changed 6 years ago by vbraun_spam

  • Milestone changed from sage-6.1 to sage-6.2

comment:5 Changed 6 years ago by vbraun_spam

  • Milestone changed from sage-6.2 to sage-6.3

comment:6 Changed 5 years ago by vbraun_spam

  • Milestone changed from sage-6.3 to sage-6.4
Note: See TracTickets for help on using tickets.