Skip to content

Conversation

Luis-Varona
Copy link
Contributor

@Luis-Varona Luis-Varona commented Oct 9, 2025

We add the methods 'eigmin' and 'eigmax' on the type 'F::Union{Eigen, GeneralizedEigen}' similarly to how 'eigvals' is defined on 'F'. Note that the corresponding unit tests in 'test/eigen.jl' that call 'eigvals' on such a struct are updated to include 'eigmin' and 'eigmax' calls as well; if all eigenvalues are real, the actual functionality of the methods is tested, and if any happen to be complex, then we test that they throw 'MethodError's.

(Resolves #1464 by @longemen3000.)

We add the methods 'eigmin' and 'eigmax' on the type 'F::Union{Eigen, GeneralizedEigen}' similarly to how 'eigvals' is defined on 'F'. Note that the corresponding unit tests in 'test/eigen.jl' that call 'eigvals' on such a struct are updated to include 'eigmin' and 'eigmax' calls as well; if all eigenvalues are real, the actual functionality of the methods is tested, and if any happen to be complex, then we test that they throw 'MethodError's.

(Resolves JuliaLang#1464 by @longemen3000.)
Copy link

codecov bot commented Oct 9, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.89%. Comparing base (7b21cab) to head (fe5a63b).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1468   +/-   ##
=======================================
  Coverage   93.89%   93.89%           
=======================================
  Files          34       34           
  Lines       15926    15926           
=======================================
+ Hits        14953    14954    +1     
+ Misses        973      972    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This commit incorporates changes suggested by @jishnub to edit all associated 'F.values'/'f.values' calls in the diff to 'eigvals(F)'/'eigvals(f)' instead.

Co-authored-by: Jishnu Bhattacharya <[email protected]>
@Luis-Varona
Copy link
Contributor Author

@jishnub, I've made the requested changes. Thanks for the review.

@Luis-Varona Luis-Varona requested a review from jishnub October 9, 2025 13:10
@Luis-Varona
Copy link
Contributor Author

Hi @jishnub - do you think this is all ready to be merged now? :)

@jishnub jishnub merged commit 6f73f65 into JuliaLang:master Oct 12, 2025
4 checks passed
@jishnub
Copy link
Member

jishnub commented Oct 12, 2025

Thanks!

@hz-xiaxz
Copy link
Contributor

Should these functions be doced?

@Luis-Varona
Copy link
Contributor Author

Luis-Varona commented Oct 12, 2025

Should these functions be doced?

I was wondering that too, but the already existing eigvals method on F:::Union{Eigen, GeneralizedEigen} that inspired this in the first place is not doc'ed either. Either all three should be or none should be. Thoughts, @jishnub?

@Luis-Varona Luis-Varona deleted the 1464-Eigen-methods branch October 14, 2025 03:22
@Luis-Varona
Copy link
Contributor Author

@hz-xiaxz, @jishnub - I think I will work on a PR later today that adds these methods for eigvals/eigmax/eigmin to their respective function docstrings.

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.

eigmin/eigmax for Eigen?

3 participants