#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:                    
      
--------------------------------------------+-------------------------------
Changes (by caruso):

  * status:  needs_work => needs_info


Comment:

 Replying to [comment:3 chapoton]:
 > * it does not look good to use a global variable dict_jordan
 > * You should instead use the decorator @cached_function to cache the
 results of a procedure.
 > * every procedure should be doctested.
 > * do you really need two procedures to do that ?

 The main problem is that lists are not hashable. Therefore a cached
 function can't take a list as an argument and, consequently, I can't use
 the decorator @cached_function to cache the result of q_jordan (at least
 without changing the prototype of this function).
 Moreover, working with just one function would imply to check the shape of
 the inputs at each recursive call (which is of course useless and may cost
 a lot).

 I propose another implementation (using @cached_function and a nested
 function) in trac_13640_qjordan-2.patch. Please tell me whether it's
 better or not according to you.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13640#comment:4>
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.

Reply via email to