Skip to content
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

Global field accessor macros for matrices and polynomials #1985

Open
albinahlback opened this issue May 17, 2024 · 0 comments
Open

Global field accessor macros for matrices and polynomials #1985

albinahlback opened this issue May 17, 2024 · 0 comments

Comments

@albinahlback
Copy link
Collaborator

If all matrix and polynomials of different types are on the same form, why not set global macros such as

#define flint_mat_entry(mat,i,j) ((mat)->rows[i] + (j))
#define flint_mat_nrows(mat) ((mat)->r)
#define flint_mat_ncols(mat) ((mat)->c)

#define flint_poly_coeffs(poly) ((poly)->coeffs)
#define flint_poly_length(poly) ((poly)->length)
#define flint_poly_alloc(poly) ((poly)->alloc)
#define flint_poly_degree(poly) ((poly)->length - 1)

Feels like it should yield very consistent internals.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant