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

Smataigne #19

Merged
merged 3 commits into from
Aug 9, 2022
Merged

Smataigne #19

merged 3 commits into from
Aug 9, 2022

Conversation

smataigne
Copy link
Collaborator

tridiag.jl added to package

@smataigne smataigne merged commit 1d851d9 into main Aug 9, 2022
```
"""
function SkewHermTridiagonal(A::AbstractMatrix)
if diag(A, 1) == - adjoint.(diag(A, -1))
Copy link
Member

Choose a reason for hiding this comment

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

This allocates 4 arrays and then discards them; not sure if we care, but it's a bit excessive for a check.

You can remove 1 allocation by saving ev = diag(A,1) (since you re-use it on the same line), and another allocation by using .- instead of - (since .- will "fuse" with the adjoint.(...) call).

@stevengj
Copy link
Member

stevengj commented Aug 9, 2022

If you add "closes #17" to the PR description, then that issue would automatically be closed when this is merged.

@stevengj
Copy link
Member

stevengj commented Aug 9, 2022

Also I would recommend having a more descriptive commit/PR title than "Smataigne" … imagine that you are reading the git log a year from now and you're trying to remember what you were doing.

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.

2 participants