id summary reporter owner description type status priority milestone component resolution keywords cc merged author reviewer upstream work_issues branch commit dependencies stopgaps
17225 Degrees of looped *immutable* graphs are wrong kcrisman "See [http://stackoverflow.com/questions/26566823/sage-python-bug-in-looped-graph-degree-computation this SO question].
{{{
q=graphs.CompleteGraph(2)
q.allow_loops(True)
q.allow_multiple_edges(True)
q.add_edge([1,1])
a=q.copy(immutable=True)
b=q.copy(immutable=False)
sage: a==b
True
sage: a.degree()
[1, 2]
sage: b.degree()
[1, 3]
}}}
Basically, the problem is that the usual backend has a case for this
{{{
if self._loops and self.has_edge(v, v, None):
if self._multiple_edges:
d += len(self.get_edge_label(v, v))
else:
d += 1
}}}
but the ""static"" one doesn't." defect closed major sage-6.4 graph theory fixed Nathann Cohen Karl-Dieter Crisman N/A 4ab489733862b2d251b65ffaa864b57d3a49a528 4ab489733862b2d251b65ffaa864b57d3a49a528