On Fri, Mar 16, 2007 at 10:30:06AM -0400, David Harvey wrote:
> 
> 
> On Mar 16, 2007, at 10:13 AM, Joel B. Mohler wrote:
> 
> >
> > Hi,
> >
> > ...
> 
> Hmmm I'm a bit confused. Here's what I imagine in my ideal world:
> 
> (1) We have a .pxi file for "easy usage of the NTL C++ library from  
> other pyrex classes", as you say above.
> (2) The Polynomial_integer_dense class is implemented in pyrex. Its  
> member functions call NTL functions directly and work with NTL  
> objects directly. In particular, the ntl.pyx file would no longer  
> exist (except as repository history :-)), and neither would ntl_wrap.cc.
> 
> Is (2) what you mean by "python classes which directly encapsulate  
> NTL types"?

No, I didn't mean (2) that way.  I do think the ntl.pyx objects have other 
purposes (not as a base for core functionality though).

I think this echo's Martin's reply.  Let me give an example to augment though.  
The number field *ring* is still python.  It has the polynomial which I always 
need to mod by when doing number field arithmetic.  I want this polynomial in 
NTL format.  The easiest way to hold on to it is via a python NTL wrapper.  I 
guess the same thing could be achieved by having a member of ZZ['x'] with easy 
accessor to the underlying NTL object.  I didn't take that route because the 
polynomial is currently a member of QQ['x'] and I store an ntl_ZZX numerator 
and 
ntl_ZZ denominator in the number field.

I'm trying to think about the math a little bit behind this too.  It seems that 
I shouldn't need a denominator.  Are there number fields that need to be 
defined 
in terms of a polynomial with rational coefficients?  Or, does it have to do 
with the fact that the number field code insists on the polynomial being monic?

--
Joel

--~--~---------~--~----~------------~-------~--~----~
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-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~----------~----~----~----~------~----~------~--~---

Reply via email to