#18193: Fix CompleteDyckWords_size behaviour for negative size
----------------------------------+------------------------
Reporter: g.chatel | Owner:
Type: defect | Status: new
Priority: major | Milestone: sage-6.6
Component: combinatorics | Resolution:
Keywords: dyck words | Merged in:
Authors: Grégory Châtel | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
Dependencies: | Stopgaps:
----------------------------------+------------------------
Changes (by {'newvalue': u'Gr\xe9gory Ch\xe2tel', 'oldvalue': ''}):
* keywords: => dyck words
* type: PLEASE CHANGE => defect
* component: PLEASE CHANGE => combinatorics
* author: => Grégory Châtel
Old description:
New description:
Fix the CompleteDyckWords_size behaviour for negative size argument.
{{{
sage: DyckWords(-1)
Dyck words with -1 opening parentheses and -1 closing parentheses
sage: DyckWords(-1).cardinality()
...
ZeroDivisionError:
sage: DyckWords(-2).cardinality()
0
sage: list(DyckWords(0))
[[]]
sage: list(DyckWords(-1))
[[0]]
sage: list(DyckWords(-2))
[[0]]
sage: DyckWords(-1).random_element() in DyckWords(-1)
False
}}}
--
--
Ticket URL: <http://trac.sagemath.org/ticket/18193#comment:1>
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.