Changes between Version 4 and Version 5 of Ticket #8330


Ignore:
Timestamp:
03/02/10 02:47:27 (11 years ago)
Author:
rhinton
Comment:

changing the ticket to handle add and delete methods for completeness

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #8330

    • Property Cc ncohen added
    • Property Summary changed from BipartiteGraph needs to hook delete_vertex() and delete_vertices() to BipartiteGraph needs to override methods to add and delete vertices and edges
  • Ticket #8330 – Description

    v4 v5  
    1111Note vertex 0 still shows up in the left partition.
    1212
    13 It should also hook the add_vertex() and add_edge() (and similar) calls, but not sure of the right way to do this. 
     13It should also override add_vertex()
     14{{{
     15sage: g = BipartiteGraph()
     16sage: g.add_vertex('a')
     17sage: g.left
     18[]
     19sage: g.right  # where did it go?
     20[]
     21}}}
     22and add_edge().
     23{{{
     24sage: g = BipartiteGraph(Graph({'a':['b','c']}))
     25sage: g.left
     26['a']
     27sage: g.right
     28['b','c']
     29sage: g.add_edge('b', 'c')  # violates bipartition, should raise exception
     30}}}