Open wbhart opened 5 years ago
Related to SparsePoly
: they are not documented nor tested... should I open a separate issue?
No, they are internal only and tested via gcd. They aren't documented or tested because they shouldn't be used by the user.
We currently have a module SparsePoly used exclusively for the gcd function in MPoly. However, there is no particular reason why we couldn't try using MPoly to represent sparse polynomials. One would construct an MPoly ring in a single variable, with coefficients in another MPoly ring.
One downside is that the MPoly interface implements heap algorithms for things like division, rather than schoolbook algorithms. This is not really needed for SparsePoly's in a single variable.
The advantage might be less code, and better test code. However, it's not trivial as the SparsePoly module needs to implement operations not available for general multivariates.
I don't think Jit compilation will be reduced, because instead of compiling a SparsePoly module, you are now compiling an MPoly module over another MPoly type, which is a different type than what you started with, so it still has to Jit compile.