#18067: sage/graphs/graph.py: multigraph recognition in init fails
----------------------------+------------------------------------------
Reporter: darij | Owner:
Type: defect | Status: new
Priority: major | Milestone: sage-6.6
Component: graph theory | Keywords: graphs, sage-combinat,
Merged in: | Authors:
Reviewers: | Report Upstream: N/A
Work issues: | Branch:
Commit: | Dependencies:
Stopgaps: |
----------------------------+------------------------------------------
The idea seems to be that the `__init__` method of `Graph` should check if
the user provides some edges more than 1 time, and, if so, return a
multigraph instead of a graph. In reality, whether this happens depends on
the order of vertices the user provides:
{{{
sage: Graph([[1,2],[1,2]])
Multi-graph on 2 vertices
sage: Graph([[1,2],[2,1]])
Graph on 2 vertices
}}}
Apparently, it is the `if len(set(data[u])) != len(data[u])` conditional
on line 1497 of graph.py which fails to fire in the second example.
--
Ticket URL: <http://trac.sagemath.org/ticket/18067>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.