#13550: improvements and additions to dyck_words.py
-------------------------------------------------------------------------+--
Reporter: zabrocki |
Owner: sage-combinat
Type: enhancement |
Status: needs_review
Priority: minor |
Milestone: sage-5.5
Component: combinatorics |
Resolution:
Keywords: dyck_words, noncrossing partitions, parking functions |
Work issues:
Report Upstream: N/A |
Reviewers: stumpc5
Authors: zabrocki |
Merged in:
Dependencies: |
Stopgaps:
-------------------------------------------------------------------------+--
Comment (by zabrocki):
I have looked at Christian's changes and approve. This patch is ready to
go.
About the two issues:
* I don't object strongly to the !__str!__ and the !__repr!__ being
different, but I can see that is a bit unusual. This patch adds a
pretty_print method (and this isn't it at all), but we could rename
!__str!__() to be .pp() or put an optional argument in
.to_string(parens=True)
* I think that this seems like correct behavior to me. There isn't a
natural way of iterating through incomplete DyckWords() that I would find
particularly helpful. As it is, if you want to access incomplete Dyck
words you need to specify the the number of open and close parentheses.
That is DyckWords() is all complete DyckWords, DyckWords(n) is Dyck words
with n open and n close and DyckWords(n,k) is Dyck words with n open and k
close. The truth is, I don't have a use for iterating through all
complete/incomplete Dyck words.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13550#comment:13>
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.