#16214: Bug in is_hamiltonian: non-simple digraphs
-------------------------+-------------------------------------------------
Reporter: | Owner:
ncohen | Status: needs_work
Type: | Milestone: sage-6.2
defect | Resolution:
Priority: major | Merged in:
Component: graph | Reviewers: Vincent Delecroix
theory | Work issues:
Keywords: | Commit:
Authors: | 3d0f21d564bee94bb12b408e30d84cbaef065c9d
Nathann Cohen | Stopgaps:
Report Upstream: N/A |
Branch: |
public/16214 |
Dependencies: |
#16210 |
-------------------------+-------------------------------------------------
Changes (by vdelecroix):
* status: needs_review => needs_work
Comment:
1) You forgot graphs on 1 vertex. As I was sure you would complain (and I
am a smart guy) I did it.
2) You forgot the graph on 0 vertex. For this one, the hamiltonicity
depends on the definition of cycle. For me an empty cycle is a vertex, but
this is perhaps not common in the graph community. So please further edit
my commit.
3) I am not convinced with
{{{
weight = lambda l : l if (l is not None and l) else 1
}}}
First of all as None evaluates to False, hence you can shorten it as
{{{
weight = lambda l: l if l else 1
}}}
which I definitely love ;-) On the other hand, it is not written anywhere
that if I put a weight 0 and set `use_edge_labels=True` then my `0` will
automatically become `1`.
--
Ticket URL: <http://trac.sagemath.org/ticket/16214#comment:17>
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.