Ticket #4109 (closed defect: wontfix)

Opened 5 years ago

Last modified 5 years ago

The position dictionary of a graph is not cleared when creating a complement.

Reported by: jason Owned by: rlm
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: graph theory Keywords:
Cc: Work issues:
Report Upstream: Reviewers:
Authors: Merged in:
Dependencies: Stopgaps:

Description

g=graphs.PathGraph(6)
g.show()
h = g.complement()
h.show()

The last command shows the original P_6, not the complement. However, calling h.edges() seems to return the right results. Also, Graph(h).show() shows the correct thing, I think.

Change History

comment:1 Changed 5 years ago by jason

The possible problem:

[22:40] <rlm_> jason- the position dict of the path graph is set
[22:40] <rlm_> use layout='spring'
[22:41] *** rlm_ is now known as rlm|afk.
[22:42] <jason-> rlm_: okay, so the pos dict just needs to be cleared when creating the complement, I guess.

comment:2 Changed 5 years ago by jason

  • Summary changed from The complement of a graph shows as the original graph to The position dictionary of a graph may not be cleared when creating a complement.

comment:3 Changed 5 years ago by jason

  • Summary changed from The position dictionary of a graph may not be cleared when creating a complement. to The position dictionary of a graph is not cleared when creating a complement.

comment:4 Changed 5 years ago by rlm

This was actually a design decision -- if you take the complement, the vertices are in the same position, and you can see where the edges are and are not. Perhaps the path graph should have a more than one dimensional layout...

comment:5 Changed 5 years ago by rlm

  • Status changed from new to closed
  • Resolution set to wontfix
  • Milestone changed from sage-3.1.2 to sage-duplicate/invalid

Since this is a design decision and not a bug, I'm invalidating the ticket. If you think it's a bad design decision, take it to the mailing list. If you think path graphs shouldn't layout in lines, make a new ticket.

Note: See TracTickets for help on using tickets.