#12477: Graph.relabel modifies the dictionary given as an input
---------------------------------+------------------------------------------
   Reporter:  ncohen             |          Owner:  jason, ncohen, rlm
       Type:  defect             |         Status:  needs_review      
   Priority:  major              |      Milestone:  sage-5.0          
  Component:  graph theory       |       Keywords:  Cernay2012        
Work_issues:                     |       Upstream:  N/A               
   Reviewer:  Nicolas M. Thiéry  |         Author:  Nathann Cohen     
     Merged:                     |   Dependencies:                    
---------------------------------+------------------------------------------
Changes (by nthiery):

  * reviewer:  => Nicolas M. Thiéry


Old description:

> Well, it's as the title says...
>
> The patch just fixes it the obvious way, and moves ome code around to
> make it easier to read.
>
> (reported by Nicolas Thiéry)
>
> {{{
> sage: g = Graph({1:[2,3]})
> sage: rel = {1:'a', 2:'b'}
> sage: g.relabel(rel)
> sage: g.vertices()
> [3, 'a', 'b']
> sage: rel
> {1: 'a', 2: 'b', 3: 3}
> }}}
>
> Nathann

New description:

 Well, it's as the title says...

 The patch just fixes it in the obvious way, and moves some code around to
 make it easier to read.

 (reported by Nicolas Thiéry)

 {{{
 sage: g = Graph({1:[2,3]})
 sage: rel = {1:'a', 2:'b'}
 sage: g.relabel(rel)
 sage: g.vertices()
 [3, 'a', 'b']
 sage: rel
 {1: 'a', 2: 'b', 3: 3}
 }}}

 Nathann

--

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12477#comment:2>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to