Ticket #8330: trac_8330-smallfixes.patch

File trac_8330-smallfixes.patch, 1.5 KB (added by ncohen, 11 years ago)
  • sage/graphs/bipartite_graph.py

    # HG changeset patch
    # User Nathann Cohen <nathann.cohen@gmail.com>
    # Date 1270124756 -7200
    # Node ID 171b9ec8658bcbf3734ed62a59333006733295d6
    # Parent  e7fe3d2b736e799cce22326da6b8e63893caf932
    trac 8330 : one or two typoes
    
    diff -r e7fe3d2b736e -r 171b9ec8658b sage/graphs/bipartite_graph.py
    a b  
    452452        vertices.  Vertices that already exist in the graph will not be added
    453453        again.
    454454       
    455         INPUTS::
     455        INPUTS:
    456456
    457457          - ``vertices`` - sequence of vertices to add.
    458458
     
    527527                    new_right.add(vv)
    528528
    529529        # check that we're not trying to add vertices to the wrong sets
    530         if (new_left & self.right) or (new_right & self.left):
     530        # or that a vertex is to be placed in both
     531        if (new_left & self.right) or (new_right & self.left) or (new_right & new_left):
    531532            raise RuntimeError('Cannot add duplicate vertex to other partition.')
    532533
    533534        # add vertices
     
    544545       
    545546        INPUT:
    546547       
    547        
    548         - ``in_order`` - (default ``False``) If ``True``, this deletes the ith vertex
     548        - ``in_order`` - (default ``False``) If ``True``, this deletes the `i`th vertex
    549549           in the sorted list of vertices, i.e.  ``G.vertices()[i]``
    550550       
    551        
    552551        EXAMPLES::
    553552       
    554553            sage: B = BipartiteGraph(graphs.CycleGraph(4))