#18628: Implementation of Foata bijection on words
-------------------------------------+-------------------------------------
Reporter: aschilling | Owner:
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-6.8
Component: combinatorics | Resolution:
Keywords: words, | Merged in:
permutations, days65 | Reviewers:
Authors: Anne Schilling | Work issues:
Report Upstream: N/A | Commit:
Branch: | 83b1442a15d5ad8258494f41578cbeed28710e97
u/aschilling/foata-18628 | Stopgaps:
Dependencies: |
-------------------------------------+-------------------------------------
Comment (by saliola):
The code needs a slight modification to deal with words that are not
lists.
{{{
sage: w = Word('121314')
sage: w.foata_bijection()
---------------------------------------------------------------------------
TypeError Traceback (most recent call
last)
<ipython-input-19-9c058c286599> in <module>()
----> 1 w.foata_bijection()
/projects/24aaf173-6355-4bc5-9515-ee1048da3ea3/sage-dev-
images/sage-6.8.beta3/local/lib/python2.7/site-
packages/sage/combinat/words/finite_word.pyc in foata_bijection(self)
610 """
611 s = self.standard_permutation()
--> 612 weight = [self.count(i) for i in range(1,max(self)+1)]
613 return (s.foata_bijection()).de_standardize(weight)
614
TypeError: cannot concatenate 'str' and 'int' objects
}}}
--
Ticket URL: <http://trac.sagemath.org/ticket/18628#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 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.