From 7b2d350e9c484ee8b739b9b164b87edad97ab94f Mon Sep 17 00:00:00 2001 From: Sheehan Olver Date: Mon, 15 Apr 2024 16:03:59 +0100 Subject: [PATCH] Move over more code --- Project.toml | 4 ++-- src/interfaceimpl.jl | 11 +++++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Project.toml b/Project.toml index 7d1e482..eb9dee2 100644 --- a/Project.toml +++ b/Project.toml @@ -20,8 +20,8 @@ BlockBandedMatricesSparseArraysExt = "SparseArrays" [compat] Aqua = "0.8" ArrayLayouts = "1" -BandedMatrices = "0.17.2, 1" -BlockArrays = "0.16.34" +BandedMatrices = "1" +BlockArrays = "1" Documenter = "1" FillArrays = "1" LinearAlgebra = "1.6" diff --git a/src/interfaceimpl.jl b/src/interfaceimpl.jl index 64b5866..226103e 100644 --- a/src/interfaceimpl.jl +++ b/src/interfaceimpl.jl @@ -15,9 +15,6 @@ end blockbandwidths(::Diagonal) = (0,0) -BroadcastStyle(::Type{<:SubArray{<:Any,2,<:PseudoBlockMatrix{<:Any,<:Diagonal}, - <:Tuple{<:BlockSlice1,<:BlockSlice1}}}) = BandedStyle() - @@ -40,7 +37,6 @@ subblockbandwidths(::Zeros) = (-1,-1) # DiagonalBlockMatrix ### -sublayout(::DiagonalLayout{L}, inds::Type{<:NTuple{2,BS}}) where {L,BS<:BlockSlice{<:BlockRange1}} = bandedblockbandedcolumns(sublayout(L(),Tuple{BS})) subblockbandwidths(::Diagonal) = (0,0) bandedblockbandeddata(D::Diagonal) = permutedims(D.diag) @@ -74,3 +70,10 @@ blockbandwidths(K::BlockKron) = bandwidths(first(K.args)) subblockbandwidths(K::BlockKron) = bandwidths(last(K.args)) _blockkron(::Tuple{Vararg{AbstractBandedLayout}}, A) = BandedBlockBandedMatrix(BlockKron(A...)) + + + +## WARNING: type piracy +BroadcastStyle(::Type{<:SubArray{<:Any,2,<:PseudoBlockMatrix{<:Any,<:Diagonal}, <:Tuple{<:BlockSlice1,<:BlockSlice1}}}) = BandedStyle() + +sublayout(::DiagonalLayout{L}, inds::Type{<:NTuple{2,BS}}) where {L,BS<:BlockSlice{<:BlockRange1}} = bandedblockbandedcolumns(sublayout(L(),Tuple{BS}))