#10134: Provide the enumeration of word morphisms from a range of integers
-------------------------------+--------------------------------------------
Reporter: slabbe | Owner: slabbe
Type: enhancement | Status: needs_work
Priority: major | Milestone: sage-4.6.1
Component: combinatorics | Keywords:
Author: Sébastien Labbé | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
-------------------------------+--------------------------------------------
Comment(by slabbe):
> 1. I dislike the parameter name `l` for two reasons. First, it might
be
> confused with the digit `1`. Second, because it is not significant. I
> suggest you use the name `lengths` or `order_iterating`, well,
anything
> else more significant.
OK. The parameter `l` could be changed. I agree. But, to keep it backward
compatible, we still need to support `l`. Maybe `arg` would be more
adapted.
> 1. The possible values for `l` are quite confusing. List means
something,
> tuple, something else... I don't know if there's a more understandable
> interface that could be offered. Maybe there could be a parameter
> `lengths_interval` or `fixed_lengths`, etc. that could distinguish the
> different cases.
I disagree on that. It is not C code, it is python. For example, it is OK
to do :
{{{
sage: Permutation((5,3,2,4,1)) # tuple means cycle notation
[5, 4, 2, 1, 3]
sage: Permutation([5,3,2,4,1]) # list means images of [1, 2, 3, 4, 5] in
that order
[5, 3, 2, 4, 1]
}}}
The problems with many arguments like `lengths_interval` or
`fixed_lengths` is (1) you still need to look at the documentation to use
and understand those arguments, (2) you need to type the name of those
argument everytime you use them and (3) the code needs to consider
inconsistencies, that is, if both argument are defined by the user.
> 1. The sentence "The length of the list must be the number of letters
in
> the alphabet, and the `i`-th integer of `l` determines the length of
the
> word mapped to by the `i`-th letter of the (ordered) alphabet" is not
very
> clear. Maybe it would be better to describe it with mathematical
> expressions (although it's harder to read in terminal mode). I would
> suggest something simpler such as : "If `l` is a list, then it
describes
> the length of the images for each letter of the morphism."
I suggest :
"The length of the list must be equal to the size of the alphabet, and the
`i`-th integer of `l` determines the length of the word mapped to by the
`i`-th
letter of the (ordered) alphabet"
> Note also that I get some doctest failures:
I do not get those doctest failures. Did you rebuild your branch !?
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10134#comment:3>
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.