-
Notifications
You must be signed in to change notification settings - Fork 62
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
More lin alg #2021
More lin alg #2021
Conversation
started ZZMatrix-linalg with - is_unimodular - dixon/ solve/ init - DoublePlusOne solver added some ZZ/ZZMatrix functions
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2021 +/- ##
==========================================
- Coverage 88.36% 88.27% -0.10%
==========================================
Files 98 100 +2
Lines 36233 36727 +494
==========================================
+ Hits 32016 32419 +403
- Misses 4217 4308 +91 ☔ View full report in Codecov by Sentry. |
src/flint/fmpz_mat.jl
Outdated
function zero!(z::ZZMatrixOrPtr) | ||
@ccall libflint.fmpz_mat_zero(z::Ref{ZZMatrix})::Nothing | ||
return z | ||
end | ||
|
||
function zero_row!(z::ZZMatrix, i::Int) | ||
z_ptr = mat_entry_ptr(z, i, 1) |
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.
needs a GC.@presever z begin ....
block
src/flint/fmpz_mat.jl
Outdated
@@ -1828,6 +1841,15 @@ function sub!(z::ZZMatrixOrPtr, x::ZZMatrixOrPtr, y::ZZMatrixOrPtr) | |||
return z | |||
end | |||
|
|||
function sub!(A::ZZMatrix, B::ZZMatrix, m::Int) | |||
for i=1:nrows(A) |
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.
needs a GC.@presever A B begin ....
block
src/ZZMatrix-linalg.jl
Outdated
bN = ZZRingElem(Val(:raw)) | ||
bD = ZZRingElem(Val(:raw)) | ||
D = ZZRingElem(1) | ||
for i=1:nrows(a) |
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.
needs a GC.@presever a A begin ....
block
src/ZZMatrix-linalg.jl
Outdated
if ncols(_B) == 1 | ||
n = nrows(D.A) | ||
for i=1:n | ||
Ay_ptr = mat_entry_ptr(D.Ay, i, 1) |
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.
needs a GC.@presever D.Ay begin ....
block or something like that
src/ZZMatrix-linalg.jl
Outdated
# R = zero_matrix(ZZ, 1, ncols(U)) | ||
zero!(R) | ||
while true | ||
R_ptr = Nemo.mat_entry_ptr(R, 1, 1) |
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.
needs a GC.@presever R U begin ....
block
src/ZZMatrix-linalg.jl
Outdated
function add_into!(A::ZZMatrix, C::ZZMatrix, c::Int) | ||
A.r = max(A.r, C.r+c) | ||
for i=1:nrows(C) | ||
A_ptr = Nemo.mat_entry_ptr(A, i+c, 1) |
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.
needs a GC.@presever A C begin ....
block
src/ZZMatrix-linalg.jl
Outdated
function sub_into!(A::ZZMatrix, C::ZZMatrix, c::Int) | ||
A.r = max(A.r, C.r+c) | ||
for i=1:nrows(C) | ||
A_ptr = Nemo.mat_entry_ptr(A, i+c, 1) |
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.
needs a GC.@presever A C begin ....
block
end | ||
i += 1 | ||
end | ||
return U |
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.
Also
Nemo._fmpz_clear_fn(t)
?
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.
well spotted! Yes!
No description provided.