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

Band indexing for structured matrices with Fill bands #378

Merged
merged 3 commits into from
Jul 19, 2023

Conversation

jishnub
Copy link
Member

@jishnub jishnub commented Jul 12, 2023

After this, the following works:

julia> D = Diagonal(Ones(4));

julia> D[Band(0)]
4-element Fill{Float64}, with entries equal to 1.0

julia> D[Band(-1)]
3-element Fill{Float64}, with entries equal to 0.0

This doesn't work on master, as Zeros can't be converted to Ones. The case with Fill bands is special-cased in this PR, although a more general would be ideal in the longer term.

This also adds band indexing tests for infinite structured matrices.

@codecov
Copy link

codecov bot commented Jul 12, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.03 ⚠️

Comparison is base (3cc551e) 89.39% compared to head (310b1aa) 89.36%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #378      +/-   ##
==========================================
- Coverage   89.39%   89.36%   -0.03%     
==========================================
  Files          24       24              
  Lines        3479     3480       +1     
==========================================
  Hits         3110     3110              
- Misses        369      370       +1     
Impacted Files Coverage Δ
src/interfaceimpl.jl 97.95% <100.00%> (-2.05%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@jishnub jishnub merged commit 6caae30 into JuliaLinearAlgebra:master Jul 19, 2023
12 of 13 checks passed
@jishnub jishnub deleted the structuredfillbandindexing branch July 19, 2023 09:11
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.

1 participant