#11641: Implementation of decorator for combinatorial maps
-------------------------------------------+--------------------------------
Reporter: stumpc5 | Owner: sage-combinat
Type: enhancement | Status: needs_info
Priority: major | Milestone: sage-pending
Component: combinatorics | Resolution:
Keywords: combinatorial statistic | Work issues: move file into
combinat tree ; address TODOs in the file
Report Upstream: N/A | Reviewers:
Authors: Christian Stump | Merged in:
Dependencies: | Stopgaps:
-------------------------------------------+--------------------------------
Changes (by saliola):
* work_issues: => move file into combinat tree ; address TODOs in the
file
Comment:
Replying to [comment:16 stumpc5]:
> Replying to [comment:14 saliola]:
>
> > Apply: trac_11641-combinatorial_statistics_and_maps_decorator-
cs.2.patch, trac_11641-combinatorial_maps_review-fs.patch,
trac_11641_concrete_combinatorial_maps_cb.patch
>
> Should I delete all patches on the ticket, and you again add those we
want to keep?
That line that begins with "Apply:" is for the patchbot.
> good - but I guess we are creating tons of conflicts in the queue if
trac_11641_concrete_combinatorial_maps_cb.patch gets merged into main sage
(though I guess we should do it anyway).
It has to happen eventually. We'll rebase the queue, if necessary.
> > But we have some questions: - I've littered the file
combinatorial_maps.py with TODOs. Take a look at them. Most are
documentation issues, or things I don't understand. - another question:
why doesn't the following work? {{{ sage: from sage.misc.combinatorial_map
import combinatorial_maps_in_class sage: p = Permutation([1,3,2,4]) sage:
cmaps = combinatorial_maps_in_class(p) sage: cmaps[0] (p) }}}
>
> We want to call this function as in
>
> {{{
> sage: p.inverse()
> }}}
> so
> {{{
> sage: cmaps[0]()
> }}}
> returns p.whatevercmapsof0is(). Does that make sense to you?
Using this reasoning, shouldn't the following work then? I am using
Permutation_class instead of an instance of a permutation to grab the
combinatorial maps:
{{{
sage: p = Permutation([1,3,2,4])
sage: Permutation_class = type(p)
sage: cmaps = combinatorial_maps_in_class(Permutation_class)
sage: cmaps[0](p)
}}}
Note that this also returns an error:
{{{
sage: cmaps[0]()
}}}
> - should this file be in `sage.combinat.misc` or
`sage.combinat.combinatorial_maps` instead of `sage.misc` ?
>
> Adding it to `sage.combinat.misc` or `sage.combinat.combinatorial_maps`
sounds good to me; I basically copied the behaviour of some other
decorator that happend to be in `sage.misc`.
Okay, we should move it.
Did you get a chance to take a look at the TODOs in the file? There are
some places that need doctests and others that need documentation, and I
don't know how to do it.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11641#comment:18>
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.