Skip to content

Conversation

@jishnub
Copy link
Member

@jishnub jishnub commented Apr 30, 2025

Since an UpperHessenberg matrix is square, we may require this condition in the constructor. Currently, this accepts a rectangular parent as well.

@codecov
Copy link

codecov bot commented Apr 30, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.74%. Comparing base (41db513) to head (134af1c).
Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1328   +/-   ##
=======================================
  Coverage   93.73%   93.74%           
=======================================
  Files          34       34           
  Lines       15750    15751    +1     
=======================================
+ Hits        14763    14765    +2     
+ Misses        987      986    -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.

@stevengj
Copy link
Member

stevengj commented May 1, 2025

I don't agree with this. It's not that unusual to talk about non-square upper-triangular matrices, so why not non-square upper-Hessenberg? The concept seems well-defined to me, and is currently supported:

julia> UpperHessenberg(rand(0:9, 7,4))
7×4 UpperHessenberg{Int64, Matrix{Int64}}:
 2  0  7  3
 8  9  0  4
   5  0  4
     8  0
       5
       
       

julia> UpperHessenberg(rand(0:9, 4,7))
4×7 UpperHessenberg{Int64, Matrix{Int64}}:
 6  3  6  8  4  8  8
 8  8  3  2  6  5  4
   4  2  0  7  3  5
     6  2  8  9  6

Right now, there's not much you can do with a non-square upper-Hessenberg factorization, but there's an open issue for fast QR factorization (#625), which could be done in $O(m^2)$ time for an $m \times n$ upper-Hessenberg matrix using Givens rotations, and this could potentially be useful for Hessenberg least-square problems.

For example, GMRES is a famous case where non-square upper-Hessenberg least-square problems arise.

@jishnub
Copy link
Member Author

jishnub commented May 1, 2025

Thank you. As long as there's a genuine use case, I'll close this

@jishnub jishnub closed this May 1, 2025
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