#15216: Parking functions reject their offspring
-------------------------+-------------------------------------------------
Reporter: darij | Owner:
Type: defect | Status: new
Priority: major | Milestone: sage-5.12
Component: | Keywords: sage-combinat, parking
combinatorics | function, combinatorialclass
Merged in: | Authors:
Reviewers: | Report Upstream: N/A
Work issues: | Branch:
Commit: | Dependencies:
Stopgaps: |
-------------------------+-------------------------------------------------
{{{
sage: [1,1,1] in ParkingFunctions(3)
True
sage: ParkingFunctions(3)([1,1,1]) in ParkingFunctions(3)
False
sage: ParkingFunctions(3)([1,1,1]) in ParkingFunctions()
False
sage: ParkingFunctions()([1,1,1]) in ParkingFunctions()
False
sage: ParkingFunctions(3)(ParkingFunctions(3)([1,1,1]))
---------------------------------------------------------------------------
ValueError Traceback (most recent call
last)
<ipython-input-57-e5b6b3a9c099> in <module>()
----> 1
ParkingFunctions(Integer(3))(ParkingFunctions(Integer(3))([Integer(1),Integer(1),Integer(1)]))
/home/darij/sage-5.12.beta5/local/lib/python2.7/site-
packages/sage/combinat/combinat.pyc in __call__(self, x)
1371 return self._element_constructor_(x)
1372 else:
-> 1373 raise ValueError, "%s not in %s"%(x, self)
1374
1375 Element = CombinatorialObject # mostly for backward
compatibility
ValueError: [1, 1, 1] not in Parking functions of size 3
sage: ParkingFunctions()(ParkingFunctions()([1,1,1]))
---------------------------------------------------------------------------
ValueError Traceback (most recent call
last)
<ipython-input-58-39833821920e> in <module>()
----> 1
ParkingFunctions()(ParkingFunctions()([Integer(1),Integer(1),Integer(1)]))
/home/darij/sage-5.12.beta5/local/lib/python2.7/site-
packages/sage/combinat/combinat.pyc in __call__(self, x)
1371 return self._element_constructor_(x)
1372 else:
-> 1373 raise ValueError, "%s not in %s"%(x, self)
1374
1375 Element = CombinatorialObject # mostly for backward
compatibility
ValueError: [1, 1, 1] not in Parking functions
}}}
Also, the docstring of {{{ParkingFunction}}} is wrong; this method returns
elements, not the class.
The call {{{ParkingFunction([1]).diagonal_reading_word()}}} results in a
ValueError; I don't think it should. That, and its docstring shouldn't
refer to its pretty print for the definition.
Travis, are you planning to give {{{parking_function.py}}} the #12913
treatment?
--
Ticket URL: <http://trac.sagemath.org/ticket/15216>
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/groups/opt_out.