Changes between Initial Version and Version 2 of Ticket #15669


Ignore:
Timestamp:
01/13/14 16:50:25 (6 years ago)
Author:
tscrim
Comment:

Replying to ncohen:

Well, I guess you can fix this one yourself ! You should just add a immutable=True to the call of copy in this method.

Done and NR. Although making an immutable copy destroys the name of the graph, so a slightly different question is do we want that behavior.

Besides, your second example of code is not really a bug. GC is what it should be, but if you plot the complement of a graph with the same layout as for the original graph, it so happens that the edges are all horizontal too. You can add a layout="spring" to plot() to emphasize it.

Ah, I see. I also understand why you want to keep the same layout as the original graph too.

Thanks,
Travis


New commits:

5b42e19Fixed complement for immutable graphs.
e2a498cFixed doctest output.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #15669

    • Property Status changed from new to needs_review
    • Property Commit changed from to e2a498c3c7adc71adcadd76b0bc09ea9a6efe77c
    • Property Branch changed from to public/graphs/complement-15699
    • Property Authors changed from to Travis Scrimshaw
  • Ticket #15669 – Description

    initial v2  
    66}}}
    77which is because `copy(Gamma)` doesn't return a mutable copy.
    8 
    9 They are plotting their original graph.
    10 {{{
    11 sage: G = graphs.PathGraph(5)
    12 sage: G.plot()
    13 sage: GC = G.complement()
    14 sage: GC.plot() # Same as G.plot()
    15 }}}