BlockBandedMatrices.jl
BlockBandedMatrices.jl copied to clipboard
Banded block banded matrix with different bandwidths for the blocks
I have a banded block banded matrix where the blocks themselves can have different bandwidths. Specifically, the bandwidth within the blocks is dependent on which block-diagonal the block is in. e.g., the block at index k ∈ [-l, u] would have a bandwidth of (λ, μ) = (1 - k, 1 + k), so that a block on the subdiagonal k=-1 has a bandwidth of (2, 0), a block on the diagonal k=0 is tridiagonal, and a block on the superdiagonal k=1 has a bandwidth of (0, 2). Can this be represented using this package?
Not yet but the current implementation could be modified to take a vector of bandwidths. This sort of thing does come up a lot
Do you anticipate doing so would cause any performance regressions? Otherwise, perhaps it would be better to add a new subtype of AbstractBandedBlockBandedMatrix.
No I don’t think there are any performance regressions since it doesn’t really use the fact that all the bandwidths are the same. and if there was anywhere that made a difference we could just overload for the case where the bandwidths are <: Fill
Some implementation details will need to be changed though.