Skip to content

Matrix boolean #1029

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

Merged
merged 5 commits into from
Apr 5, 2024
Merged

Matrix boolean #1029

merged 5 commits into from
Apr 5, 2024

Conversation

Alex-Jordan
Copy link
Contributor

This builds on #1012, adding some boolean methods: isUpperTriangular, isLowerTriangular, isDiagonal, isSymmetric, isREF, isRREF, and isOrthogonal. In some places, the code could have been shorter and more elegant, but I tried to lean toward efficiency. For example, isSymmetric could have simply asked if $self == $self->transpose, but I suspect what is here is a little faster.

These will help with custom answer checkers in a linear algebra course. For example asking a student to orthogonally diagonalize a matrix.

@pstaabp
Copy link
Member

pstaabp commented Mar 6, 2024

Overall, this looks good. I think we do need to add POD to this and I would recommend a test file, but I have started one and can add it later.

Copy link
Member

@drgrice1 drgrice1 left a comment

Choose a reason for hiding this comment

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

This looks good other than the lack of the min method.

@Alex-Jordan
Copy link
Contributor Author

This looks good other than the lack of the min method.

I committed your suggestion for doing it directly.

Copy link
Member

@drgrice1 drgrice1 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 now!

@drgrice1
Copy link
Member

drgrice1 commented Apr 5, 2024

This can be merged I think.

@drgrice1 drgrice1 merged commit 7a0350d into openwebwork:develop Apr 5, 2024
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.

3 participants