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

Implement vcat(::AbstractBandedMatrix...) #448

Merged
merged 23 commits into from
Sep 4, 2024

Conversation

max-vassili3v
Copy link
Contributor

No description provided.

Copy link

codecov bot commented Jul 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.93%. Comparing base (47c15ab) to head (9e8706b).
Report is 8 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #448      +/-   ##
==========================================
+ Coverage   89.61%   89.93%   +0.32%     
==========================================
  Files          25       25              
  Lines        3571     3675     +104     
==========================================
+ Hits         3200     3305     +105     
+ Misses        371      370       -1     

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

src/generic/AbstractBandedMatrix.jl Outdated Show resolved Hide resolved
test/test_cat.jl Show resolved Hide resolved
@max-vassili3v
Copy link
Contributor Author

I've had a lot of issues involving randomly generated banded matrices where one or both of the bandwidths exceed the dimensions of a matrix (e.g a 2x2 BandedMatrix with bandwidths (4,3)). Is it worth adding something in the constructors that clamps l and u between -m and n-1 and -n and m-1 respectively?

@dlfivefifty
Copy link
Member

No because having more bands than the dimension is permitted

I would recommend not using random bandwidths in the unit tests

ext/BandedMatricesSparseArraysExt.jl Outdated Show resolved Hide resolved
ext/BandedMatricesSparseArraysExt.jl Outdated Show resolved Hide resolved
end
end

LinearAlgebra.vcat(x::Union{OneElement, AbstractBandedMatrix}...) = vcat(BandedMatrix.(x)...)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
LinearAlgebra.vcat(x::Union{OneElement, AbstractBandedMatrix}...) = vcat(BandedMatrix.(x)...)
Base.vcat(x::Union{OneElement, AbstractBandedMatrix}...) = vcat(convert.(BandedMatrix, x)...)

@dlfivefifty dlfivefifty merged commit 4ff8ff0 into JuliaLinearAlgebra:master Sep 4, 2024
1 check passed
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