#4536: [with patch, needs review] Various number field order and ideal utilities
-------------------------------------------+--------------------------------
 Reporter:  cremona                        |        Owner:  was       
     Type:  enhancement                    |       Status:  new       
 Priority:  major                          |    Milestone:  sage-3.2.1
Component:  number theory                  |   Resolution:            
 Keywords:  number fields, orders, ideals  |  
-------------------------------------------+--------------------------------
Comment (by cremona):

 Replying to [comment:3 mhansen]:
 > Replying to [comment:2 cremona]:
 > > Quick answer: it never occurred to me to do it any other way!  But
 isn't it completely standard in Sage that when an object has a property
 (such as the norm for an ideal) then one computes it the first time and
 caches it so that further requests for the property used the cached value?
 This is surely different from caching values of a function.
 >
 > The cached_method decorator is relatively new which is why it isn't in
 use throughout Sage.  For an example, see the groebner_basis method in
 sage/rings/polynomial/multi_polynomial_ideal.py
 >
 > That's exactly what the cached_method decorator does except that it also
 handles the case where arguments are passed into the method.  The values
 are cached in a dictionary attribute on the object itself so it gets
 garbage collected correctly.  It also supports things such as clearing the
 cache, etc.

 That looks brilliant, and had completely passed me by.  I'll start using
 it right away!  It would also be a good idea to start to systematically
 use it all over (wouldn't it) -- then people would see it and use it
 themselves.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/4536#comment:4>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of 
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
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