#11181: edge labels should be unique
-------------------------------+--------------------------------------------
Reporter: rlm | Owner: jason, ncohen, rlm
Type: defect | Status: needs_review
Priority: major | Milestone: sage-4.7
Component: graph theory | Keywords:
Author: Robert Miller | Upstream: N/A
Reviewer: Christian Stump | Merged:
Work_issues: |
-------------------------------+--------------------------------------------
Comment(by rlm):
Replying to [comment:7 ncohen]:
> - The first one is about line 1597... It begins with an "else" after a
"for" loop, and I really don't understand how it compiles or what it means
`O_o`
http://docs.python.org/release/1.5/tut/node23.html
> - I edited several areas of the code to "cache" the label of a vertex
which was called several times... I can not do that for the (tricky)
iterators appearing just afterwards
Since those iterators construct a list anyway, there is no real reason for
them to be written that way, but I didn't want to touch more code than
necessary.
> do you think it's woth doing ? In which case I would copy the
code from the lines above thise one, and remove the label-related
tests.... `:-)`
Very very careful! You'd do better to rearrange the current code. Each
chunk of code is slightly different, of course..... This is maybe not
worth it, I'm not really sure.
> - There is a ``self.edge_labels.pop(ll_int)`` in ``set_edge_label``
but not in `del_arc_unsafe`... Is there any reason ? `:-)`
It should be in `del_edge` if anywhere. Probably I just forgot to delete
the edge label from the translation dictionary.
Your referee patch looks good to me, although you may post another one
after reading these comments....
Thanks!
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11181#comment:8>
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.