#13306: Generators for chessboard graphs: King, Queen, Knight, Bishop, Rooks
------------------------------------+---------------------------------------
Reporter: dcoudert | Owner: jason, ncohen, rlm
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-5.4
Component: graph theory | Resolution:
Keywords: graph, generator | Work issues:
Report Upstream: N/A | Reviewers: Sebastian Luther
Authors: David Coudert | Merged in:
Dependencies: | Stopgaps:
------------------------------------+---------------------------------------
Comment (by dcoudert):
I'm unable to install the review patch. Have you make it using the file I
have uploaded this morning in which I have removed double underscores ?
> * Default values : rook = True, bishop = True, knight = False :
that's weird. Why not set them all to True or all to False ?
That way the default behavior is QueenGraph, which is the most common
chessboard graph. But all default parameters are OK for me.
> * dim_list : it takes any iterable as an input, and you say that it
takes sets or even dicts ! That's asking for trouble because the order in
which the elements are listed in sets and dicts is platform-dependent, but
then you specifically SORT the elements by key value when the inout is a
dict, and take the VALUES into account. That's not what it is expected. A
dict is an iterable, but list(my_dict) lists its keys, not values ! It
would make more sense to remove the part of the code that deals with dict
(why especially dicts, by the way ? One can make custom iterables !), and
just use your ``dim = list(dim_list)`` which is perfect as it is.
That's right. Can you insert this in the review patch?
> * I replaced "at least" or "least" by ">=". This way you know
whether ">=" or ">" is intended, which is never clear with "at least" :-P
> * Replaced a block of code by itertools.product
I didn't know that command. Very nice.
> * Added many "`" for tuples that could appear in LaTeX instead.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13306#comment:37>
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.