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

Miscellaneous changes to the groups code #1351

Merged
merged 1 commit into from
May 23, 2022

Conversation

fingolfin
Copy link
Member

  • add some type annotations
  • improve some docstrings
  • replace some low-level access by use of accessor functions
  • add ncols(::MatrixGroupElem) to complement nrows(::MatrixGroupElem)
    (they will always return the same value, but it seems natural to offer
    both, and will potentially prevent some confusion for some poor sod
    down the line)

- add some type annotations
- improve some docstrings
- replace some low-level access by use of accessor functions
- add `ncols(::MatrixGroupElem)` to complement `nrows(::MatrixGroupElem)`
  (they will always return the same value, but it seems natural to offer
  both, and will potentially prevent some confusion for some poor sod
  down the line)
@fieker fieker merged commit cf5009a into oscar-system:master May 23, 2022
@fingolfin fingolfin deleted the mh/misc-groups branch May 23, 2022 08:14
Copy link
Member

@ThomasBreuer ThomasBreuer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Too late for this pull request, but I can open another one, w.r.t. what I wrote in the comment.


Return the number of columns of the underlying matrix of `x`.
"""
ncols(x::MatrixGroupElem) = ncols(matrix(x))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm.
My understanding of MatrixGroupElem is as follows:
The element x stores either an Oscar matrix in x.elm or a GAP matrix in x.X or both.
Thus matrix(x) may force the computation of an Oscar matrix from x.X.
(Note that x.elm calls a suitable getproperty method.)

Perhaps it would be good to get rid of the getproperty method which somehow hides the fact that the call means more than just a field access, and to call matrix(x) in all places where one really needs the Oscar matrix.
Then x.elm calls should be restricted to those situations where one is sure that the field is already set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants