#17096: Implement categories for filtered algebras
-------------------------------------+-------------------------------------
       Reporter:  tscrim             |        Owner:  tscrim
           Type:  enhancement        |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-6.4
      Component:  categories         |   Resolution:
       Keywords:  filtered algebras  |    Merged in:
        Authors:  Travis Scrimshaw   |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  public/categories/filtered_algebras-17096|  
b29f67e46e18721313330d3a6e116cf3df2eaf8e
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by nbruin):

 Don't forget that code like this (which initializes default categories):
 {{{
 + if graded:
 +     category = AlgebrasWithBasis(R).Graded()
 + else:
 +     category = AlgebrasWithBasis(R).Filtered()
 }}}
 should do instead `AlgebrasWithBasis(R.category())` to avoid a certain
 source of memory leaks: categories are immortal, so you should avoid
 making potentially arbitrarily many of them as much as possible. See:
 {{{
 sage: GF(3)['x'].category()
 Join of Category of euclidean domains and Category of commutative algebras
 over (finite fields and subquotients of monoids and quotients of
 semigroups)
 }}}
 Once someone asks for `[AlgebrasWithBasis(GF(p)): p in
 prime_range(2,100000)]` they're in it by choice, but by default we should
 not be making categories that explicitly refer to parametrized quantities.
 We can store those in the parents themselves, where avoiding memory leaks
 is hard enough. The design of categories simply didn't take into account
 that they might need to be collected again.

--
Ticket URL: <http://trac.sagemath.org/ticket/17096#comment:34>
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/d/optout.

Reply via email to