Skip to content

Commit

Permalink
BlockArrays v1.0 + LazyArrays v2.0 (#171)
Browse files Browse the repository at this point in the history
* Cholesky tests pass

* Tests pass

* blcolasts

* PseudoBlock -> Blocked

* Update infbanded.jl

* Update Project.toml

* Update ci.yml
  • Loading branch information
dlfivefifty committed May 21, 2024
1 parent 5857c95 commit f2fe965
Show file tree
Hide file tree
Showing 14 changed files with 95 additions and 79 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ jobs:
fail-fast: false
matrix:
version:
- '1.9'
- '1'
- '1.10'
os:
- ubuntu-latest
- macOS-latest
Expand Down
22 changes: 11 additions & 11 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "InfiniteLinearAlgebra"
uuid = "cde9dba0-b1de-11e9-2c62-0bab9446c55c"
version = "0.7.6"
version = "0.8"

[deps]
ArrayLayouts = "4c555306-a7a7-4459-81d9-ec55ddd5c99a"
Expand All @@ -19,22 +19,22 @@ SemiseparableMatrices = "f8ebbe35-cbfb-4060-bf7f-b10e4670cf57"
[compat]
Aqua = "0.8"
ArrayLayouts = "1.9.2"
BandedMatrices = "0.17.19, 1"
BlockArrays = "0.16.14"
BlockBandedMatrices = "0.12"
FillArrays = "1"
BandedMatrices = "1.0"
BlockArrays = "1.0"
BlockBandedMatrices = "0.13"
FillArrays = "1.0"
Infinities = "0.1"
InfiniteArrays = "0.13"
LazyArrays = "1.3"
LazyBandedMatrices = "0.9"
InfiniteArrays = "0.14"
LazyArrays = "2.0"
LazyBandedMatrices = "0.10"
LinearAlgebra = "1"
MatrixFactorizations = "2.2"
MatrixFactorizations = "3.0"
Random = "1"
SemiseparableMatrices = "0.3"
SemiseparableMatrices = "0.4"
SpecialFunctions = "2"
StaticArrays = "1"
Test = "1"
julia = "1.9"
julia = "1.10"

[extras]
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
Expand Down
12 changes: 6 additions & 6 deletions src/InfiniteLinearAlgebra.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import BandedMatrices: BandedColumns, BandedMatrix, BandedMatrix, _BandedMatrix,
_BandedMatrix, _BandedMatrix, _banded_qr, _banded_qr!, _default_banded_broadcast, banded_chol!,
banded_similar, bandedcolumns, bandeddata, bandwidths, bandwidths

import BlockArrays: AbstractBlockLayout, BlockLayout, BlockSlice, BlockSlice1, BlockedUnitRange,
blockcolsupport, sizes_from_blocks
import BlockArrays: AbstractBlockLayout, BlockLayout, BlockSlice, BlockSlice1, BlockedOneTo,
blockcolsupport, sizes_from_blocks, OneToCumsum, AbstractBlockedUnitRange

import BlockBandedMatrices: AbstractBlockBandedLayout, BlockBandedMatrix, BlockSkylineMatrix,
BlockSkylineSizes, BlockTridiagonal, _BlockBandedMatrix, _BlockSkylineMatrix,
Expand All @@ -38,12 +38,12 @@ import Infinities: InfiniteCardinal, Infinity

import LazyArrays: AbstractCachedMatrix, AbstractCachedVector, AbstractLazyLayout, ApplyArray, ApplyLayout, ApplyMatrix,
CachedArray, CachedLayout, CachedMatrix, CachedVector, LazyArrayStyle, LazyLayout,
LazyLayouts, LazyMatrix, PaddedLayout, _broadcast_sub_arguments,
LazyLayouts, LazyMatrix, AbstractPaddedLayout, PaddedColumns, _broadcast_sub_arguments,
applybroadcaststyle, applylayout, arguments, cacheddata, paddeddata, resizedata!, simplifiable,
simplify

import LazyBandedMatrices: AbstractLazyBandedBlockBandedLayout, AbstractLazyBandedLayout, ApplyBandedLayout, BlockVec,
BroadcastBandedLayout, KronTravBandedBlockBandedLayout, LazyBandedLayout, OneToCumsum,
BroadcastBandedLayout, KronTravBandedBlockBandedLayout, LazyBandedLayout,
_block_interlace_axes, _krontrav_axes, krontravargs

import LinearAlgebra: AbstractQ, AdjOrTrans, factorize, matprod, qr
Expand Down Expand Up @@ -103,7 +103,7 @@ resizes a vector `c` but in a way that block sizes are not changed when `c` has
It may allocate a new vector in some settings.
"""
compatible_resize!(_, c::AbstractVector, n) = resize!(c, n)
compatible_resize!(ax::BlockedUnitRange, c::AbstractVector, n) = resize!(c, iszero(n) ? Block(0) : findblock(ax, n))
compatible_resize!(ax::BlockedOneTo, c::AbstractVector, n) = resize!(c, iszero(n) ? Block(0) : findblock(ax, n))
compatible_resize!(c, n) = compatible_resize!(axes(c,1), c, n)
chop!(c::AbstractVector{T}, tol::Real=zero(real(T))) where T = compatible_resize!(c, choplength(c, tol))

Expand All @@ -128,7 +128,7 @@ pad(c, ax...) = PaddedArray(c, ax)

pad(c::Transpose, ax, bx) = transpose(pad(parent(c), bx, ax))
pad(c::Adjoint, ax, bx) = adjoint(pad(parent(c), bx, ax))
pad(c::BlockVec, ax::BlockedUnitRange{<:InfStepRange}) = BlockVec(pad(c.args[1], size(c.args[1],1), ∞))
pad(c::BlockVec, ax::BlockedOneTo{Int,<:InfStepRange}) = BlockVec(pad(c.args[1], size(c.args[1],1), ∞))

export Vcat, Fill, ql, ql!, ∞, ContinuousSpectrumError, BlockTridiagonal

Expand Down
22 changes: 15 additions & 7 deletions src/banded/infbanded.jl
Original file line number Diff line number Diff line change
Expand Up @@ -381,11 +381,11 @@ _BandedMatrix(::PertToeplitzLayout, A::AbstractMatrix) =
@inline sub_materialize(::BandedColumns, V, ::Tuple{InfAxes,InfAxes}) = BandedMatrix(V)
@inline sub_materialize(::BandedColumns, V, ::Tuple{InfAxes,OneTo{Int}}) = BandedMatrix(V)

sub_materialize(_, V, ::Tuple{<:BlockedUnitRange{<:InfRanges}}) = V
sub_materialize(::AbstractBlockLayout, V, ::Tuple{<:BlockedUnitRange{<:InfRanges}}) = V
function sub_materialize(::PaddedLayout, v::AbstractVector{T}, ax::Tuple{<:BlockedUnitRange{<:InfRanges}}) where T
sub_materialize(_, V, ::Tuple{BlockedOneTo{Int,<:InfRanges}}) = V
sub_materialize(::AbstractBlockLayout, V, ::Tuple{BlockedOneTo{Int,<:InfRanges}}) = V
function sub_materialize(::PaddedColumns, v::AbstractVector{T}, ax::Tuple{BlockedOneTo{Int,<:InfRanges}}) where T
dat = paddeddata(v)
PseudoBlockVector(Vcat(sub_materialize(dat), Zeros{T}(∞)), ax)
BlockedVector(Vcat(sub_materialize(dat), Zeros{T}(∞)), ax)
end

##
Expand Down Expand Up @@ -446,14 +446,14 @@ _bandedfill_mul(M::MulAdd, ::Tuple{Any,InfAxes}, ::Tuple{InfAxes,Any}) = ApplyAr

mulreduce(M::Mul{<:InfToeplitzLayouts, <:InfToeplitzLayouts}) = ApplyArray(M)
mulreduce(M::Mul{<:InfToeplitzLayouts}) = ApplyArray(M)
mulreduce(M::Mul{<:InfToeplitzLayouts,<:PaddedLayout}) = MulAdd(M)
mulreduce(M::Mul{<:InfToeplitzLayouts,<:PaddedColumns}) = MulAdd(M)
mulreduce(M::Mul{<:Any, <:InfToeplitzLayouts}) = ApplyArray(M)
mulreduce(M::Mul{<:AbstractQLayout, <:InfToeplitzLayouts}) = ApplyArray(M)
mulreduce(M::Mul{<:DiagonalLayout, <:InfToeplitzLayouts}) = Lmul(M)
mulreduce(M::Mul{<:InfToeplitzLayouts, <:DiagonalLayout}) = Rmul(M)


function _bidiag_forwardsub!(M::Ldiv{<:Any,<:PaddedLayout})
function _bidiag_forwardsub!(M::Ldiv{<:Any,<:PaddedColumns})
A, b_in = M.A, M.B
dv = diagonaldata(A)
ev = subdiagonaldata(A)
Expand Down Expand Up @@ -536,4 +536,12 @@ Base.typed_hcat(::Type{T}, A::BandedMatrix{<:Any,<:Any,OneToInf{Int}}, B::Abstra
# SymTriPertToeplitz
###

MemoryLayout(::Type{<:SymTriPertToeplitz}) = PertTridiagonalToeplitzLayout()
MemoryLayout(::Type{<:SymTriPertToeplitz}) = PertTridiagonalToeplitzLayout()


####
# Banded, TODO: move to extension in InfiniteArrays.jl
###

sublayout(::ApplyBandedLayout, ::Type{<:Tuple{KR,Integer}}) where {KR<:InfAxes} =
sublayout(PaddedColumns{UnknownLayout}(), Tuple{KR})
21 changes: 11 additions & 10 deletions src/blockbanded/blockbanded.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ BlockArrays.sortedunion(a::OneToInfCumsum, ::OneToInfCumsum) = a
BlockBandedMatrices.blockbanded_colstop(A, x::InfiniteCardinal{0}) = x
BlockBandedMatrices.blockbanded_rowstop(A, x::InfiniteCardinal{0}) = x

BlockArrays.blocklasts(a::InfRanges) = Fill(length(a),1)


function BlockArrays.sortedunion(a::Vcat{Int,1,<:Tuple{Union{Int,AbstractVector{Int}},<:AbstractRange}},
Expand All @@ -24,10 +25,10 @@ function BlockArrays.sortedunion(a::Vcat{Int,1,<:Tuple{Union{Int,AbstractVector{
end

sizes_from_blocks(A::AbstractVector, ::Tuple{OneToInf{Int}}) = (map(length,A),)
length(::BlockedUnitRange{<:InfRanges}) = ℵ₀
length(::BlockedOneTo{Int,<:InfRanges}) = ℵ₀

const OneToInfBlocks = BlockedUnitRange{OneToInfCumsum}
const OneToBlocks = BlockedUnitRange{OneToCumsum}
const OneToInfBlocks = BlockedOneTo{Int,OneToInfCumsum}
const OneToBlocks = BlockedOneTo{Int,OneToCumsum}

axes(a::OneToInfBlocks) = (a,)
axes(a::OneToBlocks) = (a,)
Expand All @@ -48,9 +49,9 @@ function copy(bc::Broadcasted{<:BroadcastStyle,<:Any,typeof(*),<:Tuple{AbstractA
convert(AbstractArray{promote_type(T,V),N}, a)
end

_block_interlace_axes(::Int, ax::Tuple{BlockedUnitRange{OneToInf{Int}}}...) = (blockedrange(Fill(length(ax), ∞)),)
_block_interlace_axes(::Int, ax::Tuple{BlockedOneTo{Int,OneToInf{Int}}}...) = (blockedrange(Fill(length(ax), ∞)),)

_block_interlace_axes(nbc::Int, ax::NTuple{2,BlockedUnitRange{OneToInf{Int}}}...) =
_block_interlace_axes(nbc::Int, ax::NTuple{2,BlockedOneTo{Int,OneToInf{Int}}}...) =
(blockedrange(Fill(length(ax) ÷ nbc, ∞)),blockedrange(Fill(mod1(length(ax),nbc), ∞)))


Expand All @@ -66,10 +67,10 @@ BroadcastStyle(::Type{<:SubArray{T,N,Arr,<:NTuple{N,BlockSlice{BlockRange{1,Tupl
LazyArrayStyle{N}()

# TODO: generalise following
BroadcastStyle(::Type{<:BlockArray{T,N,<:AbstractArray{<:AbstractArray{T,N},N},<:NTuple{N,BlockedUnitRange{<:InfRanges}}}}) where {T,N} = LazyArrayStyle{N}()
# BroadcastStyle(::Type{<:PseudoBlockArray{T,N,<:AbstractArray{T,N},<:NTuple{N,BlockedUnitRange{<:InfRanges}}}}) where {T,N} = LazyArrayStyle{N}()
BroadcastStyle(::Type{<:BlockArray{T,N,<:AbstractArray{<:AbstractArray{T,N},N},<:NTuple{N,BlockedUnitRange{<:RangeCumsum{Int,<:InfRanges}}}}}) where {T,N} = LazyArrayStyle{N}()
# BroadcastStyle(::Type{<:PseudoBlockArray{T,N,<:AbstractArray{T,N},<:NTuple{N,BlockedUnitRange{<:RangeCumsum{Int,<:InfRanges}}}}}) where {T,N} = LazyArrayStyle{N}()
BroadcastStyle(::Type{<:BlockArray{T,N,<:AbstractArray{<:AbstractArray{T,N},N},<:NTuple{N,BlockedOneTo{Int,<:InfRanges}}}}) where {T,N} = LazyArrayStyle{N}()
# BroadcastStyle(::Type{<:BlockedArray{T,N,<:AbstractArray{T,N},<:NTuple{N,BlockedOneTo{Int,<:InfRanges}}}}) where {T,N} = LazyArrayStyle{N}()
BroadcastStyle(::Type{<:BlockArray{T,N,<:AbstractArray{<:AbstractArray{T,N},N},<:NTuple{N,BlockedOneTo{Int,<:RangeCumsum{Int,<:InfRanges}}}}}) where {T,N} = LazyArrayStyle{N}()
# BroadcastStyle(::Type{<:BlockedArray{T,N,<:AbstractArray{T,N},<:NTuple{N,BlockedOneTo{Int,<:RangeCumsum{Int,<:InfRanges}}}}}) where {T,N} = LazyArrayStyle{N}()


###
Expand All @@ -80,7 +81,7 @@ _krontrav_axes(A::OneToInf{Int}, B::OneToInf{Int}) = blockedrange(oneto(length(A


struct InfKronTravBandedBlockBandedLayout <: AbstractLazyBandedBlockBandedLayout end
MemoryLayout(::Type{<:KronTrav{<:Any,2,<:Any,NTuple{2,BlockedUnitRange{OneToInfCumsum}}}}) = InfKronTravBandedBlockBandedLayout()
MemoryLayout(::Type{<:KronTrav{<:Any,2,<:Any,NTuple{2,BlockedOneTo{Int,OneToInfCumsum}}}}) = InfKronTravBandedBlockBandedLayout()

sublayout(::InfKronTravBandedBlockBandedLayout, ::Type{<:NTuple{2,BlockSlice1}}) = BroadcastBandedLayout{typeof(*)}()
sublayout(::InfKronTravBandedBlockBandedLayout, ::Type{<:NTuple{2,BlockSlice{BlockRange{1,Tuple{OneTo{Int}}}}}}) = KronTravBandedBlockBandedLayout()
Expand Down
4 changes: 2 additions & 2 deletions src/blockbanded/infblocktridiagonal.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const BlockTriPertToeplitz{T} = BlockMatrix{T,Tridiagonal{Matrix{T},Vcat{Matrix{T},1,Tuple{Vector{Matrix{T}},Fill{Matrix{T},1,Tuple{OneToInf{Int}}}}}},
NTuple{2,BlockedUnitRange{Vcat{Int,1,Tuple{Vector{Int},InfStepRange{Int,Int}}}}}}
NTuple{2,BlockedOneTo{Int,Vcat{Int,1,Tuple{Vector{Int},InfStepRange{Int,Int}}}}}}

const BlockTridiagonalToeplitzLayout = BlockLayout{TridiagonalToeplitzLayout,DenseColumnMajor}

Expand Down Expand Up @@ -38,7 +38,7 @@ sizes_from_blocks(A::Bidiagonal, ::NTuple{2,OneToInf{Int}}) = size.(A.dv, 1), si
sizes_from_blocks(A::LazyBandedMatrices.Bidiagonal, ::NTuple{2,OneToInf{Int}}) = size.(A.dv, 1), size.(A.dv,2)

axes_print_matrix_row(_, io, X, A, i, ::AbstractVector{<:PosInfinity}, sep) = nothing
axes_print_matrix_row(::NTuple{2,BlockedUnitRange}, io, X, A, i, ::AbstractVector{<:PosInfinity}, sep) = nothing
axes_print_matrix_row(::NTuple{2,AbstractBlockedUnitRange}, io, X, A, i, ::AbstractVector{<:PosInfinity}, sep) = nothing


function BlockSkylineSizes(A::BlockTriPertToeplitz, (l,u)::NTuple{2,Int})
Expand Down
2 changes: 1 addition & 1 deletion src/infcholesky.jl
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ end
colsupport(F::AdjOrTrans{<:Any,<:AdaptiveCholeskyFactors}, j) = rowsupport(parent(F), j)
rowsupport(F::AdjOrTrans{<:Any,<:AdaptiveCholeskyFactors}, j) = colsupport(parent(F), j)

function materialize!(M::MatLdivVec{<:TriangularLayout{'L','N',<:AdaptiveLayout},<:PaddedLayout})
function materialize!(M::MatLdivVec{<:TriangularLayout{'L','N',<:AdaptiveLayout},<:AbstractPaddedLayout})
A,B = M.A,M.B
T = eltype(M)
COLGROWTH = 1000 # rate to grow columns
Expand Down
14 changes: 7 additions & 7 deletions src/infql.jl
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ getL(Q::QL, ::NTuple{2,InfiniteCardinal{0}}) = LowerTriangular(Q.factors)
getL(Q::QLHessenberg, ::NTuple{2,InfiniteCardinal{0}}) = LowerTriangular(Q.factors)


function materialize!(M::Lmul{<:QLPackedQLayout{<:BandedColumns},<:PaddedLayout})
function materialize!(M::Lmul{<:QLPackedQLayout{<:BandedColumns},<:AbstractPaddedLayout})
A,B = M.A,M.B
require_one_based_indexing(B)
mA, nA = size(A.factors)
Expand Down Expand Up @@ -130,7 +130,7 @@ function materialize!(M::Lmul{<:QLPackedQLayout{<:BandedColumns},<:PaddedLayout}
B
end

function materialize!(M::Lmul{<:AdjQLPackedQLayout{<:BandedColumns},<:PaddedLayout})
function materialize!(M::Lmul{<:AdjQLPackedQLayout{<:BandedColumns},<:AbstractPaddedLayout})
adjA,B = M.A,M.B
require_one_based_indexing(B)
A = parent(adjA)
Expand Down Expand Up @@ -174,7 +174,7 @@ function blocktailiterate(c,a,b, d=c, e=a)
d̃,ẽ = QLPackedQ(F.factors[1:n,n+1:2n],F.τ[1:n])*d̃,QLPackedQ(F.factors[1:n,n+1:2n],F.τ[1:n])*# undo last rotation
if (d̃, d; atol=1E-10) && (ẽ, e; atol=1E-10)
X[1:n,1:n] = d̃; X[1:n,n+1:2n] =
return PseudoBlockArray(X,fill(n,2), fill(n,3)), F.τ[n+1:2n]
return BlockedArray(X,fill(n,2), fill(n,3)), F.τ[n+1:2n]
end
d,e = d̃,ẽ
end
Expand Down Expand Up @@ -266,7 +266,7 @@ end
ldiv!(F::QLProduct, b::AbstractVector) = ldiv!(F.L, lmul!(F.Q',b))
ldiv!(F::QLProduct, b::LayoutVector) = ldiv!(F.L, lmul!(F.Q',b))

function materialize!(M::MatLdivVec{<:TriangularLayout{'L','N',BandedColumns{PertConstRows}},<:PaddedLayout})
function materialize!(M::MatLdivVec{<:TriangularLayout{'L','N',BandedColumns{PertConstRows}},<:AbstractPaddedLayout})
A,b = M.A,M.B
require_one_based_indexing(A, b)
n = size(A, 2)
Expand All @@ -290,7 +290,7 @@ end

ql_layout(layout, ::NTuple{2,OneToInf{Int}}, A, args...; kwds...) = error("Not implemented")

_data_tail(::PaddedLayout, a) = paddeddata(a), zero(eltype(a))
_data_tail(::PaddedColumns, a) = paddeddata(a), zero(eltype(a))
_data_tail(::AbstractFillLayout, a) = Vector{eltype(a)}(), getindex_value(a)
_data_tail(::CachedLayout, a) = cacheddata(a), getindex_value(a.array)
function _data_tail(::ApplyLayout{typeof(vcat)}, a)
Expand Down Expand Up @@ -495,9 +495,9 @@ getindex(Q::QLPackedQ{<:Any,<:AdaptiveQLFactors}, I::Int, J::UnitRange{Int}) =
getindex(Q::QLPackedQ{<:Any,<:AdaptiveQLFactors}, I::UnitRange{Int}, J::Int) =
[Q[i,j] for i in I, j in J]

materialize!(M::Lmul{<:QLPackedQLayout{<:LazyLayout},<:PaddedLayout}) = ApplyArray(*,M.A,M.B)
materialize!(M::Lmul{<:QLPackedQLayout{<:LazyLayout},<:AbstractPaddedLayout}) = ApplyArray(*,M.A,M.B)

function materialize!(M::Lmul{<:AdjQLPackedQLayout{<:LazyLayout},<:PaddedLayout})
function materialize!(M::Lmul{<:AdjQLPackedQLayout{<:LazyLayout},<:AbstractPaddedLayout})
adjA,B = M.A,M.B
A = parent(adjA)
mA, nA = size(A.factors)
Expand Down
20 changes: 10 additions & 10 deletions src/infqr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ function partialqr!(F::AdaptiveQRData{<:Any,<:BlockSkylineMatrix}, N::Block{1})
zero!(τ)
else
factors = view(F.data.data,Ñ+1:N+l,Ñ+1:N+u);
_blockbanded_qr!(factors, PseudoBlockVector(τ, (axes(factors,2)[Block(1):(N-Ñ)],)), N-Ñ)
_blockbanded_qr!(factors, BlockedVector(τ, (axes(factors,2)[Block(1):(N-Ñ)],)), N-Ñ)
end
F.ncols = n
end
Expand Down Expand Up @@ -170,7 +170,7 @@ getindex(Q::QRPackedQ{<:Any,<:AdaptiveQRFactors,<:AdaptiveQRTau}, I::AbstractVec
#########

_view_QRPackedQ(A, kr, jr) = QRPackedQ(view(A.factors.data.data.data,kr,jr), view(A.τ.data.τ,jr))
function materialize!(M::MatLmulVec{<:QRPackedQLayout{<:AdaptiveLayout},<:PaddedLayout})
function materialize!(M::MatLmulVec{<:QRPackedQLayout{<:AdaptiveLayout},<:AbstractPaddedLayout})
A,B = M.A,M.B
sB = size(paddeddata(B),1)
partialqr!(A.factors.data,sB)
Expand All @@ -197,7 +197,7 @@ function resizedata_chop!(v::CachedVector, tol)
v
end

function resizedata_chop!(v::PseudoBlockVector, tol)
function resizedata_chop!(v::BlockedVector, tol)
c = paddeddata(v.blocks)
n = length(c)
k_tol = choplength(c, tol)
Expand All @@ -212,7 +212,7 @@ end

_norm(x::Number) = abs(x)

function materialize!(M::MatLmulVec{<:AdjQRPackedQLayout{<:AdaptiveLayout},<:PaddedLayout}; tolerance=floatmin(real(eltype(M))))
function materialize!(M::MatLmulVec{<:AdjQRPackedQLayout{<:AdaptiveLayout},<:AbstractPaddedLayout}; tolerance=floatmin(real(eltype(M))))
adjA,B = M.A,M.B
COLGROWTH = 1000 # rate to grow columns

Expand Down Expand Up @@ -252,7 +252,7 @@ function materialize!(M::MatLmulVec{<:AdjQRPackedQLayout{<:AdaptiveLayout},<:Pad
resizedata_chop!(B, tolerance)
end

function resizedata!(B::PseudoBlockVector, M::Block{1})
function resizedata!(B::BlockedVector, M::Block{1})
resizedata!(B.blocks, last(axes(B,1)[M]))
B
end
Expand All @@ -263,11 +263,11 @@ function _view_QRPackedQ(A, KR::BlockRange, JR::BlockRange)
QRPackedQ(view(A.factors.data.data.data,KR,JR), view(A.τ.data.τ,jr))
end

function materialize!(M::MatLmulVec{<:QRPackedQLayout{<:AdaptiveLayout{<:AbstractBlockBandedLayout}},<:PaddedLayout})
function materialize!(M::MatLmulVec{<:QRPackedQLayout{<:AdaptiveLayout{<:AbstractBlockBandedLayout}},<:AbstractPaddedLayout})
A,B_in = M.A,M.B
sB = length(paddeddata(B_in))
ax1,ax2 = axes(A.factors.data.data)
B = PseudoBlockVector(B_in, (ax2,))
B = BlockedVector(B_in, (ax2,))
SB = findblock(ax2, sB)
partialqr!(A.factors.data,SB)
JR = Block(1):SB
Expand All @@ -279,13 +279,13 @@ function materialize!(M::MatLmulVec{<:QRPackedQLayout{<:AdaptiveLayout{<:Abstrac
B
end

function materialize!(M::MatLmulVec{<:AdjQRPackedQLayout{<:AdaptiveLayout{<:AbstractBlockBandedLayout}},<:PaddedLayout}; tolerance=1E-30)
function materialize!(M::MatLmulVec{<:AdjQRPackedQLayout{<:AdaptiveLayout{<:AbstractBlockBandedLayout}},<:AbstractPaddedLayout}; tolerance=1E-30)
adjA,B_in = M.A,M.B
A = parent(adjA)
T = eltype(M)
COLGROWTH = 300 # rate to grow columns
ax1,ax2 = axes(A.factors.data.data)
B = PseudoBlockVector(B_in, (ax1,))
B = BlockedVector(B_in, (ax1,))

SB = findblock(ax1, length(paddeddata(B_in)))
MA, NA = blocksize(A.factors.data.data.array)
Expand Down Expand Up @@ -334,7 +334,7 @@ function ldiv!(R::UpperTriangular{<:Any,<:AdaptiveQRFactors}, B::CachedVector{<:
end


function ldiv!(R::UpperTriangular{<:Any,<:AdaptiveQRFactors}, B::PseudoBlockArray)
function ldiv!(R::UpperTriangular{<:Any,<:AdaptiveQRFactors}, B::BlockedArray)
n = B.blocks.datasize[1]
N = findblock(axes(R,1),n)
partialqr!(parent(R).data, N)
Expand Down
Loading

2 comments on commit f2fe965

@dlfivefifty
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/107295

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.8.0 -m "<description of version>" f2fe965b5ad1901a756b0a790abade7f74b7678a
git push origin v0.8.0

Please sign in to comment.