#10953: is_regular yields StopIterator error on empty graph
--------------------------------+-------------------------------------------
Reporter: pgdx | Owner: jason, ncohen, rlm
Type: defect | Status: positive_review
Priority: minor | Milestone:
Component: graph theory | Keywords: regular is_regular empty
graph iterator
Work_issues: | Upstream: N/A
Reviewer: Michael Orlitzky | Author:
Merged: | Dependencies:
--------------------------------+-------------------------------------------
Changes (by mjo):
* status: needs_review => positive_review
* reviewer: => Michael Orlitzky
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.
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.3.patch]
--
Comment:
Perfect.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10953#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.