On May 27, 2007, at 11:47 , David Harvey wrote: > On May 27, 2007, at 2:21 PM, Michel wrote: [snip] > Well I have another idea, I'm not sure to what extent this is already > implemented in your factor_cache.pyx, or to what extent it even makes > sense. (I haven't actually looked at your code yet.) > > It sounds like this factor caching thing actually has nothing to do > with fraction fields as such. Rather it sounds like one could > implement > a wrapper around a generic ring which remembers factorisations of > elements. I'm imagining something like > > R = some ring > S = FactorCache(R) > > So now S is a ring, whose elements are products of elements of R. > Multiplication does the obvious thing, addition and subtraction I > suppose checks for common factors and just expands the rest? (I > suppose > this is very much like the Factorization class already in SAGE, except > it would support arithmetic. Or maybe the Factorization class already > supports arithmetic, I don't know.) > > Then you would just write > > K = FractionField(S) > > Would it even be necessary to write special code in the fraction field > class if it was done this way? (Hmmm.... thinking aloud in public > here....)
An intriguing idea... A couple of questions: Should this be a implementation concept, rather than an "API concept"? Not quite sure what I am asking, but this feels to me like a good idea for implementation, but not for "the user" to fiddle with. What is the difference between R and S for your average user? Would FractionField(R) and FractionField(S) be the same? How does this relate to rings like Z[\sqrt{-5}]? Keeping factorizations around for these seems problematic... Justin -- Justin C. Walker, Curmudgeon-At-Large Institute for the Absorption of Federal Funds -------- If you're not confused, You're not paying attention -------- --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/ -~----------~----~----~----~------~----~------~--~---