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

Tweak is_symmetric and is_skew_symmetric #1427

Merged
merged 1 commit into from
Sep 13, 2023
Merged

Tweak is_symmetric and is_skew_symmetric #1427

merged 1 commit into from
Sep 13, 2023

Conversation

fingolfin
Copy link
Member

  • fix their docstrings to say transpose instead of tr (which is the trace)
  • align the implementations
  • ensure they are both applicable to MatrixElem with no restrictions
  • remove redundant is_symmetric(M::MatElem) method

@codecov
Copy link

codecov bot commented Sep 12, 2023

Codecov Report

Merging #1427 (062ff81) into master (c390a51) will increase coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #1427      +/-   ##
==========================================
+ Coverage   84.60%   84.63%   +0.02%     
==========================================
  Files         109      109              
  Lines       29322    29334      +12     
==========================================
+ Hits        24809    24826      +17     
+ Misses       4513     4508       -5     
Files Changed Coverage Δ
src/NemoStuff.jl 3.34% <ø> (+0.06%) ⬆️
src/Matrix.jl 91.91% <100.00%> (+0.14%) ⬆️

... and 14 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Collaborator

@lgoettgens lgoettgens 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. But why is it is_symmetric(::MatrixElem) and is_skew_symmetric(::MatElem) with different input types. (I cannot remember the difference between them)

@fingolfin
Copy link
Member Author

Actually this PR was meant to make both of them take MatrixElem... and it did at some point, but it seems I somehow lost part of the PR while reshuffling things 😬 . I've now fixed it. Thanks for spotting my mistake!

PS: MatrixElem is an alias for Union{MatAlgElem{T}, MatElem{T}} where T

- fix their docstrings to say `transpose` instead of `tr` (which is the trace)
- align the implementations
- ensure they are both applicable to `MatrixElem` with no restrictions
- remove redundant `is_symmetric(M::MatElem`) method
@thofma thofma merged commit 9f0497b into master Sep 13, 2023
15 checks passed
@thofma thofma deleted the mh/is_symmetric branch September 13, 2023 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants