Skip to content

Conversation

@jishnub
Copy link
Member

@jishnub jishnub commented May 25, 2023

Similar to #354. This PR introduces an abstract type AbstractBandedEigenvectors and defines the indexing for that, so that its subtypes BandedEigenvectors and BandedGeneralizedEigenvectors may share the behavior. A BandedGeneralizedEigenvectors may reuse the scratch vector in the enclosed BandedEigenvectors, so no extra allocation is necessary.

After this,

julia> A = Symmetric(brand(Float64, 6, 6, 2, 4));

julia> B = Symmetric(BandedMatrix(0=>Float64.(1:6)));

julia> Λ, V = eigen(A, B);

julia> @btime $V[1,1];
  96.803 ns (0 allocations: 0 bytes)

whereas, on master,

julia> @btime $V[1,1];
  377.146 ns (1 allocation: 368 bytes)

@codecov
Copy link

codecov bot commented May 25, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.70 🎉

Comparison is base (c32e3e0) 86.73% compared to head (d9ac8f7) 87.44%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #364      +/-   ##
==========================================
+ Coverage   86.73%   87.44%   +0.70%     
==========================================
  Files          24       22       -2     
  Lines        3378     2963     -415     
==========================================
- Hits         2930     2591     -339     
+ Misses        448      372      -76     
Impacted Files Coverage Δ
src/symbanded/bandedeigen.jl 81.73% <100.00%> (+1.20%) ⬆️

... and 20 files with indirect coverage changes

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

@dlfivefifty dlfivefifty merged commit 43764a2 into JuliaLinearAlgebra:master May 25, 2023
@jishnub jishnub deleted the indexgenbandeigvec branch May 25, 2023 14:02
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