-
Notifications
You must be signed in to change notification settings - Fork 70
Import finite field code from Hecke #2234
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
base: master
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2234 +/- ##
==========================================
- Coverage 88.29% 88.18% -0.11%
==========================================
Files 100 100
Lines 37202 37246 +44
==========================================
- Hits 32849 32847 -2
- Misses 4353 4399 +46 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| function (A::fqPolyRepField)(x::zzModPolyRingElem) | ||
| u = A() | ||
| ccall((:fq_nmod_set, libflint), Nothing, | ||
| (Ref{fqPolyRepFieldElem}, Ref{zzModPolyRingElem}, Ref{fqPolyRepField}), | ||
| u, x, A) | ||
| _reduce(u) | ||
| return u | ||
| end | ||
|
|
||
| function (A::fqPolyRepField)(x::fpPolyRingElem) | ||
| u = A() | ||
| ccall((:fq_nmod_set, libflint), Nothing, | ||
| (Ref{fqPolyRepFieldElem}, Ref{fpPolyRingElem}, Ref{fqPolyRepField}), | ||
| u, x, A) | ||
| _reduce(u) | ||
| return u | ||
| end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Of course these are yet more coercions, so perhaps instead of moving them here, they should be deleted, or renamed, e.g. they could be set! methods?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The set! methods are unergonomic, since they don't take the parent. So maybe keep it for now, so that we can do the release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed
lgoettgens
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer if this would use the @ccall syntax, but that is surely something that can be done in a follow-up. So let's get this release out!
| # AbsSimpleNumFieldElem -> QQPolyRingElem | ||
| z = QQPolyRingElem() | ||
| @ccall libflint.nf_elem_get_fmpq_poly(z::Ref{QQPolyRingElem}, b::Ref{AbsSimpleNumFieldElem}, parent(b)::Ref{AbsSimpleNumField})::Nothing | ||
| z.parent = Globals.Qx |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Globals.Qx does not exist in Nemo
| # QQPolyRingElem -> ZZPolyRingElem, ZZRingElem | ||
| zz = ZZPolyRingElem() | ||
| @ccall libflint.fmpq_poly_get_numerator(zz::Ref{ZZPolyRingElem}, z::Ref{QQPolyRingElem})::Nothing | ||
| zz.parent = Globals.Zx |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Globals.Zx does not exist in Nemo
From Hecke's
src/Misc/FiniteField.jl