Opened 7 years ago

Closed 7 years ago

#12477 closed defect (fixed)

Graph.relabel modifies the dictionary given as an input

Reported by: ncohen Owned by: jason, ncohen, rlm
Priority: major Milestone: sage-5.0
Component: graph theory Keywords: Cernay2012
Cc: nthiery Merged in: sage-5.0.beta5
Authors: Nathann Cohen Reviewers: Nicolas M. Thiéry
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description (last modified by nthiery)

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

Attachments (1)

trac_12477.patch (2.3 KB) - added by ncohen 7 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 7 years ago by ncohen

  • Description modified (diff)
  • Keywords Cernay2012 added
  • Status changed from new to needs_review

Changed 7 years ago by ncohen

comment:2 Changed 7 years ago by nthiery

  • Description modified (diff)
  • Reviewers set to Nicolas M. Thiéry

comment:3 Changed 7 years ago by nthiery

  • Status changed from needs_review to positive_review

Discussed together. The tests on the file pass. Positive review assuming the buildbot gives a green light.

Thanks Nathann!

comment:4 Changed 7 years ago by jdemeyer

  • Merged in set to sage-5.0.beta5
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.