-
Notifications
You must be signed in to change notification settings - Fork 160
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
Merge some MatrixObj work into master #2640
Conversation
d4b4903
to
fb9314d
Compare
Codecov Report
@@ Coverage Diff @@
## master #2640 +/- ##
==========================================
- Coverage 75.48% 75.47% -0.02%
==========================================
Files 478 478
Lines 241601 243156 +1555
==========================================
+ Hits 182382 183524 +1142
- Misses 59219 59632 +413
|
fb9314d
to
be5fda4
Compare
I support to proceed as suggested here. Most changes will not influence existing GAP code and it would be good to start over from a master branch that contains most of the changes from the MatrixObj branch. Looking through the diffs I did not notice anything problematic. Moving the files from Currently, some tests of
Or should we also merge the more efficient kernel code that provides this functionality? |
The failing tests are a very recent regression (the previous build was fine), and I'll fix it. I also already moved the tests into |
Actually, the TraceMat one is already fixed by adding methods for The current test failure is something new, I'll investigate |
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 changes are fine.
There are just two things which I do not understand:
The file hpcgap/lib/vec8bit.gi
gets changed
but there are no changes for lib/vec8bit.gi
;
as far as I see, the current code in lib/vec8bit.gi
still contains ConvertToVectorRepNC
calls
which we want to get rid of.
And what is the reason to replace, in hpcgap/lib/vec8bit.gi
,
the one-line statements involving CopyToVectorRep
and an arithmetic operation by two statements?
be5fda4
to
f2ea1ed
Compare
There were changes in |
I enthusiastically support merging this; it's useful code that shouldn't lie around somewhere bitrotting. I haven't really worked on this code, so I don't have in-depth knowledge of what is added/changed. I remember that |
This passes all tests now. But it would be good to run the package tests against this, too, as I wrote above, before merging; let's wait to hear from @alex-konovalov on this. BTW, this PR add methods for |
@fingolfin hear this - doing tests now. |
@alex-konovalov any news on this? |
I have checked test logs from July 18th and I don't see diffs in package tests which are different from diffs that I've seen in their tests run with the GAP master branch. Since that was almost a month ago, may be worth to rebase this PR and run another round of tests to be sure. |
These delegate to MatElm resp. SetMatElm, so that old MatrixObj implementations which only provide these old accessors can be used with the new m[i,j] syntax. Ideally, these will be removed again one day in the future, together with MatElm and SetMatElm.
Note that the cvec package also installs methods for some of these, and should possibly be adjusted to avoid them We should also think about replacements. Perhaps there should be PositionLastNonZeroRow and PositionLastNonZeroColumn methods? Finally, why is PositionLastNonZero for (row) vectors in vecmat.gi, which contains code for GF2 vectors and matrices?
Also add ZeroMatrix and IdentityMatrix variants, and add lots of comments.
This makes `Vector` the main interface function to create vector objects.
- get rid of IsCheckingVector and IsCheckingMatrix - update internal doc: - NewMatrix now additionally accepts a flat list - remove redundant comments
changed most library calls to PositionNot added attributes OneOfBaseDomain, ZeroOfBaseDomain, and generic methods for plist vectors and plist matrices
IsCheckingVector and -Matrix do checks like: - when doing v * s, check whether s in BaseDomain(v) holds. this can potentially be very expensive - check whether accessing or binding to illegal entries - check whether dimensions of matrices and vectors fit when doing AddRowVector etc. \* for IsPlist*Rep already checks whether dimensions match and whether the base domains are identical. Instead some checks could be done (like index out of bounds checks) on the kernel level.
and dealt with some side-effects: - changed calls of `MatElm(m,i,j)` to `m[i,j]` where `MatElm` methods for plain lists of plain lists are missing - changed those method installations from `InstallMethod` to `InstallOtherMethod` that currently cause a warning about matching multiple declarations; in a later step, some of these declarations will get merged - changed calls of `BaseDomain` to calls of `OneOfBaseDomain` or `ZeroOfBaseDomain` where only the one or zero element are needed - added comments to `lib/matobj1.gd`
f2ea1ed
to
c193f63
Compare
Thanks. Rebased now, let's see how the tests fare. |
@alex-konovalov could you please run another round of extended tests, so that we can ideally merge this ASAP? Thanks! |
@fingolfin I've triggered extended tests yesterday, so I've just checked the outcome. I will be happy to merge this now. |
Matrix
and BaseDomain
introduced in #2640 to unbreak Semigroups
on master
#2754
Last year, we made some progress on MatrixObj. Sadly, we got stalled again. But I think even the partial work we did would already be useful.
I took the MatrixObj2 branch, and looked through it, and cleaned it up a lot. I also dropped (for now, this is only temporary) a few changes that I think are potentially more controversial (such as @ssiccha MultRowVector to MultVector change). Assuming this PR gets merged, I would then prepare a new branch and PR (or possibly multiple) with all the remaining work, which then can either merge, too, or continue to work on.
Some TODOs (?) before merge:
tst/test-matobj
can be run viatst/test-matobj.g
, but this is not currently hooked up to Travis. Is there any reason why we don't just move these tests intotestinstall
and/or (for very slow parts) intoteststandard
?