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

Make more lib/matrix.gi code compatible with MatrixObj #3556

Merged
merged 1 commit into from
Jul 11, 2019

Conversation

fingolfin
Copy link
Member

In particular powering of MatrixObjs now is fast, and we have generic methods for IsDiagonalMat, IsUpperTriangularMat, IsLowerTriangularMat

@fingolfin fingolfin added kind: enhancement Label for issues suggesting enhancements; and for pull requests implementing enhancements topic: library release notes: not needed PRs introducing changes that are wholly irrelevant to the release notes labels Jul 11, 2019
Copy link
Contributor

@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.

looks good
(Alternatively, one could just remove the lines checking IsEmpty(mat).)

@fingolfin
Copy link
Member Author

True... actually, that made me wonder: Can non-square matrices to be diagonal or triangular? If so, what is the definition? For triangular, it seems our code is a bit asymmetric; e.g. IsUpperTriangularMat accepts any zero matrix provided its number of columns is >= the number of rows minus 1. Which seems rather arbitrary.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.0001%) to 84.3% when pulling bb6f23a on fingolfin:mh/MatrixObj-compat into 0e29ceb on gap-system:master.

@fingolfin fingolfin merged commit ed6e032 into gap-system:master Jul 11, 2019
@fingolfin fingolfin deleted the mh/MatrixObj-compat branch July 11, 2019 18:49
@ThomasBreuer
Copy link
Contributor

Concerning the definitions, the Reference Manual says:

IsDiagonalMat( mat ) returns true if mat has only zero entries off the main diagonal, false otherwise.

IsUpperTriangularMat( mat ) returns true if mat has only zero entries below the main diagonal, false otherwise.

IsLowerTriangularMat( mat ) returns true if mat has only zero entries below the main diagonal, false otherwise.

(Of course the second "below" has to be replaced by "above".)

Concerning the code, IsUpperTriangularMat runs into problems if the matrix has too few columns.

I will provide a pull request (also for correcting some more details of the documentation).

@fingolfin
Copy link
Member Author

I already provided such a pull request yesterday

@fingolfin
Copy link
Member Author

That is, PR #3559 fixes IsUpperTriangularMat, but I did not make any correction to the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: enhancement Label for issues suggesting enhancements; and for pull requests implementing enhancements release notes: not needed PRs introducing changes that are wholly irrelevant to the release notes topic: library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants