#14690: Useless memory allocation in listing neighbors of a graph
--------------------------------------------+-------------------------------
Reporter: vdelecroix | Owner: jason, ncohen, rlm
Type: enhancement | Status: needs_work
Priority: major | Milestone: sage-5.11
Component: graph theory | Resolution:
Keywords: sparse graph, allocation | Work issues:
Report Upstream: N/A | Reviewers:
Authors: Vincent Delecroix | Merged in:
Dependencies: | Stopgaps:
--------------------------------------------+-------------------------------
Changes (by vdelecroix):
* status: needs_review => needs_work
Comment:
All right, I found one concrete problem. With the patch applied
{{{
sage: edges =
[(1,4),(7,16),(9,11),(11,8),(12,6),(14,5),(5,8),(15,4),(4,10),
....: (10,6),(6,3),(3,8),(8,16),(16,13),(13,0),(0,2),(2,17)]
sage: G1 = Graph(); G2 = Graph()
sage: G1.add_vertices(range(18))
sage: for e in edges:
....: G1.add_edge(e); G2.add_edge(e)
}}}
Now `G1` and `G2` should be the same graph but `G1` is completely bugged
{{{
sage: G1.has_edge(13,16)
True
sage: (13,16) in G1.edges(labels=False)
False
}}}
while it works for `G2`
{{{
sage: G2.has_edge(13,16)
True
sage: (13,16) in G2.edges(labels=False)
True
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14690#comment:6>
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.