Skip to content

Commit

Permalink
paddedrows
Browse files Browse the repository at this point in the history
  • Loading branch information
dlfivefifty committed May 7, 2024
1 parent 7ea6456 commit 29bda92
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/AlmostBandedMatrix.jl
Original file line number Diff line number Diff line change
Expand Up @@ -278,9 +278,9 @@ struct VcatAlmostBandedLayout <: AbstractAlmostBandedLayout end


# avoid ambuities
applylayout(::Type{typeof(vcat)}, ::ScalarOrBandedLayouts, ::AbstractBandedLayout) = ApplyBandedLayout{typeof(vcat)}()
applylayout(::Type{typeof(vcat)}, ::ScalarOrBandedLayouts, ::ScalarOrBandedLayouts, ::AbstractBandedLayout) = ApplyBandedLayout{typeof(vcat)}()
applylayout(::Type{typeof(vcat)}, ::ScalarOrBandedLayouts, ::ScalarOrBandedLayouts, ::ScalarOrBandedLayouts, ::AbstractBandedLayout) = ApplyBandedLayout{typeof(vcat)}()
applylayout(::Type{typeof(vcat)}, ::DualLayout{<:PaddedRows}, ::AbstractBandedLayout) = ApplyBandedLayout{typeof(vcat)}()
applylayout(::Type{typeof(vcat)}, ::DualLayout{<:PaddedRows}, ::DualLayout{<:PaddedRows}, ::AbstractBandedLayout) = ApplyBandedLayout{typeof(vcat)}()
applylayout(::Type{typeof(vcat)}, ::DualLayout{<:PaddedRows}, ::DualLayout{<:PaddedRows}, ::DualLayout{<:PaddedRows}, ::AbstractBandedLayout) = ApplyBandedLayout{typeof(vcat)}()


applylayout(::Type{typeof(vcat)}, _, ::AbstractBandedLayout) = VcatAlmostBandedLayout()
Expand Down
3 changes: 2 additions & 1 deletion src/SemiseparableMatrices.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Base: size, getindex, setindex!, convert, copyto!
import MatrixFactorizations: QR, QRPackedQ, getQ, getR, QRPackedQLayout, AdjQRPackedQLayout
import LinearAlgebra: qr, qr!, lmul!, ldiv!, rmul!, triu!, factorize, rank
import BandedMatrices: _banded_qr!, bandeddata, resize
import LazyArrays: arguments, applylayout, _cache, CachedArray, CachedMatrix, ApplyLayout, resizedata!
import LazyArrays: arguments, applylayout, _cache, CachedArray, CachedMatrix, ApplyLayout, resizedata!, PaddedRows
import ArrayLayouts: MemoryLayout, sublayout, sub_materialize, MatLdivVec, materialize!, triangularlayout,
triangulardata, zero!, _copyto!, colsupport, rowsupport,
_qr, _qr!, _factorize
Expand All @@ -15,6 +15,7 @@ export SemiseparableMatrix, AlmostBandedMatrix, LowRankMatrix, ApplyMatrix, Appl

LazyArraysBandedMatricesExt = Base.get_extension(LazyArrays, :LazyArraysBandedMatricesExt)
ScalarOrBandedLayouts = LazyArraysBandedMatricesExt.ScalarOrBandedLayouts
ApplyBandedLayout = LazyArraysBandedMatricesExt.ApplyBandedLayout

const LowRankMatrix{T,A,B} = MulMatrix{T,Tuple{A,B}}
LowRankMatrix(A::AbstractArray, B::AbstractArray) = ApplyMatrix(*, A, B)
Expand Down

0 comments on commit 29bda92

Please sign in to comment.