diff --git a/Project.toml b/Project.toml index cc18e35..9f18b9b 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "BlockBandedMatrices" uuid = "ffab5731-97b5-5995-9138-79e8c1846df0" -version = "0.13.5" +version = "0.13.6" [deps] ArrayLayouts = "4c555306-a7a7-4459-81d9-ec55ddd5c99a" diff --git a/src/interfaceimpl.jl b/src/interfaceimpl.jl index b47650a..39b5dee 100644 --- a/src/interfaceimpl.jl +++ b/src/interfaceimpl.jl @@ -57,8 +57,8 @@ function blockbandwidths(::AbstractBandedLayout, (a,b)::Tuple{AbstractBlockedUni end end -function blockbandwidths(::AbstractBandedLayout, (a,b)::Tuple{BlockedOneTo{<:Any,<:AbstractRange}, BlockedOneTo{<:Any,<:AbstractRange}}, A) - a ≠ b && return blockbandwidths(UnknownLayout(), (a,b), A) # can implement same step but not done yet +function blockbandwidths(::AbstractBandedLayout, (a,b)::Tuple{AbstractBlockedUnitRange{<:Any,<:AbstractRange}, AbstractBlockedUnitRange{<:Any,<:AbstractRange}}, A) + step(a.lasts) ≠ step(b.lasts) && return blockbandwidths(UnknownLayout(), (a,b), A) # can implement same step but not done yet l,u = bandwidths(A) s = step(a.lasts) # normal blocksize (l+s-1) ÷ s, (u+s-1) ÷ s @@ -85,9 +85,9 @@ sublayout(::DiagonalLayout{L}, inds::Type{<:NTuple{2,BS}}) where {L,BS<:BlockSli ## # special for unitblocks -blockbandwidths(A::BlockedMatrix{<:Any,<:Any,<:NTuple{2,BlockedOneTo{Int,<:AbstractUnitRange{Int}}}}) = bandwidths(A.blocks) -blockbandwidths(A::BlockedMatrix{<:Any,<:Diagonal,<:NTuple{2,BlockedOneTo{Int,<:AbstractUnitRange{Int}}}}) = bandwidths(A.blocks) -subblockbandwidths(A::BlockedMatrix{<:Any,<:Any,<:NTuple{2,BlockedOneTo{Int,<:AbstractUnitRange{Int}}}}) = (0,0) +blockbandwidths(A::BlockedMatrix{<:Any,<:Any,<:NTuple{2,AbstractBlockedUnitRange{Int,<:AbstractUnitRange{Int}}}}) = bandwidths(A.blocks) +blockbandwidths(A::BlockedMatrix{<:Any,<:Diagonal,<:NTuple{2,AbstractBlockedUnitRange{Int,<:AbstractUnitRange{Int}}}}) = bandwidths(A.blocks) +subblockbandwidths(A::BlockedMatrix{<:Any,<:Any,<:NTuple{2,AbstractBlockedUnitRange{Int,<:AbstractUnitRange{Int}}}}) = (0,0) ## BlockVector