On Wednesday, December 21, 2016 at 7:10:35 PM UTC+1, John Cremona wrote:
>
> Is there a list somewhere of which C or C++ types or classes can be 
> converted in cython files? 
>
> For example, in the eclib interface (in sage/libs/eclib) a lot of 
> quite complicated C++ classes defined in eclib are made available, all 
> essentailly based on int.  But I want to make available a function 
> which returns an NTL RR (real number).  The NTL interface does not 
> include RR.   Would it be possible to do this, by first adding RR to 
> the list of NTL types Sage knows about and then using that? 
>
I would say yes, this should be possible.
Actually Cython even supports templating nowadays if that's what you had in 
mind.

What do you class look like?
And where are they defined in Sage's cython files?
I guess in:
* 
https://github.com/sagemath/sage/blob/develop/src/sage/libs/eclib/__init__.pxd

I would also say that the interface in sage/interface/eclib might deserve a 
little bit of clean up along the lines of what was done for MPIR, MPFR, 
PARI and partially for NTL.
At least, you could put all the class definition into a decl.pxd file as 
for the aforementioned libraries.
Or even its own pip installable package :)

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to