#13640: q-numbers coutings flags stable under a nilpotent endomorphism
--------------------------------------------+-------------------------------
Reporter: caruso | Owner: sage-combinat
Type: enhancement | Status: needs_info
Priority: major | Milestone: sage-5.5
Component: combinatorics | Resolution:
Keywords: combinatorics, q-numbers | Work issues: doctest,
cached_function
Report Upstream: N/A | Reviewers:
Authors: caruso | Merged in:
Dependencies: | Stopgaps:
--------------------------------------------+-------------------------------
Comment (by nthiery):
Replying to [comment:6 caruso]:
> Ok. I attach a third implementation where q_jordan is a method of
Partition. It works but it's quite slow. (I suspect a problem with
{{{@cached_method}}}, but I'm not sure.)
Did you run it with %prun? Among other things, it will tell you how many
times the method is called, from which you can check whether the cache
works.
Ah, in this situation, you probably want to use @cached_in_parent.
Otherwise, the result for p.q_jordan() is cached in p. So if you recreate
an identical partition as p2, p2.q_jordan won't see the cache in p.
Cheers,
Nicolas
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13640#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 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.