Ticket #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 | 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
Change History
comment:1 Changed 16 months ago by ncohen
- Keywords Cernay2012 added
- Status changed from new to needs_review
- Description modified (diff)
comment:2 Changed 16 months ago by nthiery
- Reviewers set to Nicolas M. Thiéry
- Description modified (diff)
Note: See
TracTickets for help on using
tickets.

