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

Add more setcoeff! methods and use them to deduplicate PolyRingElem constructors #1911

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

lgoettgens
Copy link
Collaborator

Unfortunately this won't work as I try to access attributes/parents of elements in setcoeff! before they are set.
I see two ways to resolve this issue:

  1. All element constructors should get a parent. This will be a bigger change, in particular if we want to have this consistent for all poly types.
  2. setcoeff! gets an optional fourth argument, that is a UInt for nmod_poly-based types and a fmpz_mod_ctx_struct for fmpz_mod_poly-based types. If this fourth argument is not passed, we can reconstruct it (in many cases, but not inside of the constructors as parents are not available).

I would tend to 2 for now, and maybe remove this fourth argument again once 1 has made enough progress. What do you think @fingolfin ?

@lgoettgens lgoettgens force-pushed the lg/more_setcoeff branch 3 times, most recently from 3a67681 to ce53c5c Compare November 8, 2024 15:12
Copy link

codecov bot commented Nov 8, 2024

Codecov Report

Attention: Patch coverage is 84.48276% with 18 lines in your changes missing coverage. Please review.

Project coverage is 87.88%. Comparing base (2876db2) to head (3f86479).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/flint/fmpz_mod_abs_series.jl 33.33% 6 Missing ⚠️
src/flint/fmpz_mod_rel_series.jl 37.50% 5 Missing ⚠️
src/flint/nmod_abs_series.jl 66.66% 3 Missing ⚠️
src/flint/nmod_rel_series.jl 66.66% 3 Missing ⚠️
src/flint/fmpz_mod_poly.jl 90.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1911      +/-   ##
==========================================
- Coverage   87.89%   87.88%   -0.01%     
==========================================
  Files          99       99              
  Lines       36366    36181     -185     
==========================================
- Hits        31965    31799     -166     
+ Misses       4401     4382      -19     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lgoettgens lgoettgens marked this pull request as ready for review November 8, 2024 15:49
@lgoettgens
Copy link
Collaborator Author

This now implements option 2 of the initial message.

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

Successfully merging this pull request may close these issues.

1 participant