Skip to content

Help understanding the relationship between generic and specific types in Flint3 #86

Open
@GiacomoPope

Description

@GiacomoPope

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 for fq_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 and specific_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 the generic_types first, and then do things like cdef class fmpz_poly(generic_poly), if we can inherit the available methods?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions