-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Help understanding the relationship between generic and specific types in Flint3 #86
Comments
Making the question broader I wonder if we should use the generic types for all polynomials and matrices. At a base level the scalar types like It should be possible though to use There are some functions in Flint that are specific to one type though e.g. |
I have a bit of a better understanding of how the gr stuff works now and so some of what I said above does not make sense any more... I think that we want to add the In a higher-level interface we can abstract over this so that the user does something like: F, z = GF(p, d)
R, [x, y] = F.mpoly_ring(["x", "y"])
p = x*y + z
p.factor() The internal implementation of There are then two cases where we might want to convert between
Those conversions should all be transparent to the user though and ideally with a high-level interface they wouldn't need to think about these things. |
This is a very broad question, but I will pick something specific just to help make this clear.
In
gr_poly.h
there are methods for evaluation, and in particular, fast multipoint evaluation using product trees is available for the generic type.Looking at then specific types,
fmpz_mod_poly
has both the naive iterative Horner method, but also a faster method building a product tree, which i assume is similar to the above for the generic type. However, this same method seems to be missing forfq_poly
, which has no multipoint evaluation at all?For the cases where it is not implemented for the specific type, can we fall back to the generic type? In the cases where it's implemented for both what happens? What's the relationship between
generic_X
andspecific_X
.My thinking for
python-flint
, the answer for the above then filters through to how we structure out code.If we can inherit generic methods on specific types, should we then build from
flint_base
and implement thegeneric_types
first, and then do things likecdef class fmpz_poly(generic_poly)
, if we can inherit the available methods?The text was updated successfully, but these errors were encountered: