Opened 9 years ago

Last modified 9 years ago

#12477 closed defect

Graph.relabel modifies the dictionary given as an input — at Version 2

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

Status badges

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

Change History (3)

comment:1 Changed 9 years ago by ncohen

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

Changed 9 years ago by ncohen

comment:2 Changed 9 years ago by nthiery

  • Description modified (diff)
  • Reviewers set to Nicolas M. Thiéry
Note: See TracTickets for help on using tickets.