Changes between Initial Version and Version 4 of Ticket #8330


Ignore:
Timestamp:
02/24/10 17:58:45 (11 years ago)
Author:
rhinton
Comment:

I just tested graph.py for another potential change, and found that a few doctests fail due to this patch. Specifically, the tests create BipartiteGraphs? (e.g. K23), and the Graph algorithm adds a temp vertex, then deletes it later. But the new delete_vertex() raises an exception when it can't find the temp vertex in its left or right sets.

So we may need to fix add_vertex before this delete_vertex solution will work. Or should we do a soft-fail (print a warning?) instead of raising an exception?

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #8330

    • Property Status changed from new to needs_work
  • Ticket #8330 – Description

    initial v4  
    22
    33{{{
     4sage: g = BipartiteGraph(graphs.CycleGraph(4))
     5sage: (g.left, g.right)
     6([0, 2], [1, 3])
     7sage: g.delete_vertex(0)
     8sage: g.left
     9[0, 2]
    410}}}
     11Note vertex 0 still shows up in the left partition.
    512
    613It should also hook the add_vertex() and add_edge() (and similar) calls, but not sure of the right way to do this.