-
Notifications
You must be signed in to change notification settings - Fork 161
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
IsMatrixObj
objects as elements of GAP's matrix groups
#3093
IsMatrixObj
objects as elements of GAP's matrix groups
#3093
Conversation
Great, thanks for working on this! I agree that we should not have |
lib/matrix.gi
Outdated
return f; | ||
return f; | ||
fi; | ||
Error( "all in <l> must either be lists of lists or have the same BaseDomain" ); |
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.
Error( "all in <l> must either be lists of lists or have the same BaseDomain" ); | |
Error( "all elements in <l> must either be lists of lists or have the same BaseDomain" ); |
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.
Looks OK to me.
Are the proposed changes in accessing a matrix Thanks! Alexander |
Accessing matrix entries via The overall MatrixObj code is not yet properly documented, this is something we badly must work on, and I hope we can make at least partial progress on it for GAP 4.11. This will then on the long run allow us to overcome all kinds of issues, and help improve performance, reduce memory usage, etc. etc. |
GAP's default mechanism for dealing with small matrix groups is to compute an isomorphic permutation group via the action on orbits of vectors. With these changes, this mechanism works for groups of objects in `IsMatrixObj` that are not plain lists of lists. Of course this is just one step, more changes in this area will follow. (A preliminary test case is contained in the `GAPJulia` package.) Some changes are hopefully not controversial, such as replacing `Length` calls by calls of `NumberRows`, and replacing matrix entry access `m[i][j]` by `m[i,j]`. For other changes, there would be alternatives. - Instead of introducing a new attribute `RowsOfMatrix`, one could declare `ListOp( <matobj> )` for `<matobj>` in `IsMatrixObj` (and not only for `<matobj>` in `IsRowListMatrix`). From the viewpoint that the use of `ListOp` for `IsMatrixObj` matrices is not recommended, according to `lib/matobj2.gd`, I prefer `RowsOfMatrix`. - In `DefaultScalarDomainOfMatrixList`, one could argue that also lists of `IsMatrixObj` objects with different `BaseDomain` can make sense, but I think that showing an error message is more in the spirit of `IsMatrixObj`.
d591dbe
to
b5a7672
Compare
Codecov Report
@@ Coverage Diff @@
## master #3093 +/- ##
==========================================
- Coverage 83.56% 83.56% -0.01%
==========================================
Files 686 686
Lines 336733 336756 +23
==========================================
+ Hits 281380 281396 +16
- Misses 55353 55360 +7
|
@fingolfin Thanks for your comments, I have now updated the pull request. |
GAP's default mechanism for dealing with small matrix groups
is to compute an isomorphic permutation group
via the action on orbits of vectors.
With the changes from this pull request,
this mechanism works for groups of objects in
IsMatrixObj
that are not plain lists of lists.
Of course this is just one step, more changes in this area will follow.
(A preliminary test case is contained in the
GAPJulia
package.)Some changes are hopefully not controversial,
such as replacing
Length
calls by calls ofNumberRows
,and replacing matrix entry access
m[i][j]
bym[i,j]
.For other changes, there would be alternatives.
Instead of introducing a new attribute
ListOfRowsOfMatrix
,one could declare
ListOp( <matobj> )
for<matobj>
inIsMatrixObj
(and not only for
<matobj>
inIsRowListMatrix
).From the viewpoint that the use of
ListOp
forIsMatrixObj
matricesis not recommended, according to
lib/matobj2.gd
,I prefer
ListOfRowsOfMatrix
.In the case of
DefaultScalarDomainOfMatrixList
,one could argue that also lists of
IsMatrixObj
objects with differentBaseDomain
can make sense,but I think that showing an error message is more in the spirit of
IsMatrixObj
.