#10953: is_regular yields StopIterator error on empty graph
--------------------------------+-------------------------------------------
Reporter: pgdx | Owner: jason, ncohen, rlm
Type: defect | Status: needs_review
Priority: minor | Milestone: sage-5.0
Component: graph theory | Keywords: regular is_regular empty
graph iterator
Work_issues: | Upstream: N/A
Reviewer: Michael Orlitzky | Author: Lukáš Lánský
Merged: | Dependencies:
--------------------------------+-------------------------------------------
Changes (by jdemeyer):
* status: needs_work => needs_review
* milestone: => sage-5.0
Old description:
> The following statement yields an error:
>
> sage: Graph().is_regular()
>
> A quick fix to this is to test if the size of the graph is zero, in which
> case we return true. I assume the empty graph is k-regular for any k. If
> this is not the case for sage, another (better) error should be thrown.
>
> Apply [attachment:trac_10953_empty_graph_is_regular.3.patch]
New description:
The following statement yields an error:
sage: Graph().is_regular()
A quick fix to this is to test if the size of the graph is zero, in which
case we return true. I assume the empty graph is k-regular for any k. If
this is not the case for sage, another (better) error should be thrown.
Apply [attachment:trac_10953_empty_graph_is_regular.4.patch]
--
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10953#comment:11>
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.