Ticket #12477 (closed defect: fixed)

Opened 16 months ago

Last modified 15 months ago

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 Work issues:
Report Upstream: N/A Reviewers: Nicolas M. Thiéry
Authors: Nathann Cohen Merged in: sage-5.0.beta5
Dependencies: Stopgaps:

Description (last modified by nthiery) (diff)

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

trac_12477.patch Download (2.3 KB) - added by ncohen 16 months ago.

Change History

comment:1 Changed 16 months ago by ncohen

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

Changed 16 months ago by ncohen

comment:2 Changed 16 months ago by nthiery

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

comment:3 Changed 16 months 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 15 months ago by jdemeyer

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