Skip to content

Comments

Matrix boolean#1029

Merged
drgrice1 merged 5 commits intoopenwebwork:developfrom
Alex-Jordan:matrix-boolean
Apr 5, 2024
Merged

Matrix boolean#1029
drgrice1 merged 5 commits intoopenwebwork:developfrom
Alex-Jordan:matrix-boolean

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.

Co-authored-by: Glenn Rice <47527406+drgrice1@users.noreply.github.com>
@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