Skip to content

Add transpose/adjoint specializations for block Bidiagonal #1231

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

jishnub
Copy link
Member

@jishnub jishnub commented Feb 27, 2025

With this, the adjoint of a block Bidiagonal will also be a Bidiagonal, following the behavior of a Diagonal.

julia> m = rand(Int8, 2, 2)
2×2 Matrix{Int8}:
 -50  -123
 -11    18

julia> B = Bidiagonal(fill(m,4), fill(m,3), :U)
4×4 Bidiagonal{Matrix{Int8}, Vector{Matrix{Int8}}}:
 [-50 -123; -11 18]  [-50 -123; -11 18]             
                    [-50 -123; -11 18]              
                                          [-50 -123; -11 18]
                                          [-50 -123; -11 18]

julia> B'
4×4 Bidiagonal{Adjoint{Int8, Matrix{Int8}}, Vector{Adjoint{Int8, Matrix{Int8}}}}:
 [-50 -11; -123 18]                                    
 [-50 -11; -123 18]  [-50 -11; -123 18]                  
                    [-50 -11; -123 18]                  
                                          [-50 -11; -123 18]

julia> B''
4×4 Bidiagonal{Matrix{Int8}, Vector{Matrix{Int8}}}:
 [-50 -123; -11 18]  [-50 -123; -11 18]             
                    [-50 -123; -11 18]              
                                          [-50 -123; -11 18]
                                          [-50 -123; -11 18]

Copy link
Member

@dkarrasch dkarrasch left a comment

Choose a reason for hiding this comment

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

If we do this, than we can remove methods a la

/(A::AbstractMatrix, B::Transpose{<:Any,<:Bidiagonal}) = A / copy(B)
/(A::AbstractMatrix, B::Adjoint{<:Any,<:Bidiagonal}) = A / copy(B)

@jishnub jishnub force-pushed the jishnub/bidiag_adj branch from e2c5374 to 3359898 Compare April 3, 2025 04:49
Copy link

codecov bot commented Apr 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.05%. Comparing base (e53b50c) to head (c82e846).
Report is 4 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1231      +/-   ##
==========================================
+ Coverage   92.03%   92.05%   +0.02%     
==========================================
  Files          34       34              
  Lines       15459    15443      -16     
==========================================
- Hits        14227    14216      -11     
+ Misses       1232     1227       -5     

☔ 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.

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