diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c9171c3..eef4c06 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,8 +38,7 @@ jobs: fail-fast: false matrix: version: - - '1.6' - - '1' + - '1.9' os: - ubuntu-latest - macOS-latest diff --git a/Project.toml b/Project.toml index fd3a92d..9a5b673 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "InfiniteLinearAlgebra" uuid = "cde9dba0-b1de-11e9-2c62-0bab9446c55c" -version = "0.6.24" +version = "0.7" [deps] ArrayLayouts = "4c555306-a7a7-4459-81d9-ec55ddd5c99a" @@ -24,10 +24,10 @@ BlockBandedMatrices = "0.12" FillArrays = "1" InfiniteArrays = "0.13" LazyArrays = "1.3" -LazyBandedMatrices = "0.8.7" -MatrixFactorizations = "1, 2" +LazyBandedMatrices = "0.8.7, 0.9" +MatrixFactorizations = "2.1" SemiseparableMatrices = "0.3" -julia = "1.6" +julia = "1.9" [extras] Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" diff --git a/src/InfiniteLinearAlgebra.jl b/src/InfiniteLinearAlgebra.jl index 3763bf2..ea5d85d 100644 --- a/src/InfiniteLinearAlgebra.jl +++ b/src/InfiniteLinearAlgebra.jl @@ -16,14 +16,14 @@ import BandedMatrices: BandedMatrix, _BandedMatrix, AbstractBandedMatrix, banded _default_banded_broadcast, banded_similar import FillArrays: AbstractFill, getindex_value, axes_print_matrix_row import InfiniteArrays: OneToInf, InfUnitRange, Infinity, PosInfinity, InfiniteCardinal, InfStepRange, AbstractInfUnitRange, InfAxes, InfRanges -import LinearAlgebra: matprod, qr, AbstractTriangular, AbstractQ, adjoint, transpose, AdjOrTrans +import LinearAlgebra: matprod, qr, AbstractTriangular, AbstractQ, adjoint, transpose, AdjOrTrans, copymutable import LazyArrays: applybroadcaststyle, CachedArray, CachedMatrix, CachedVector, DenseColumnMajor, FillLayout, ApplyMatrix, check_mul_axes, LazyArrayStyle, resizedata!, MemoryLayout, AbstractLazyLayout, factorize, sub_materialize, LazyLayout, LazyArrayStyle, layout_getindex, applylayout, ApplyLayout, PaddedLayout, CachedLayout, AbstractCachedVector, AbstractCachedMatrix, cacheddata, zero!, MulAddStyle, ApplyArray, LazyArray, LazyMatrix, LazyVector, paddeddata, arguments, resizedata!, simplifiable, simplify, LazyLayouts import MatrixFactorizations: ul, ul!, _ul, ql, ql!, _ql, QLPackedQ, getL, getR, getQ, getU, reflector!, reflectorApply!, QL, QR, QRPackedQ, - QRPackedQLayout, AdjQRPackedQLayout, QLPackedQLayout, AdjQLPackedQLayout, LayoutQ + QRPackedQLayout, AdjQRPackedQLayout, QLPackedQLayout, AdjQLPackedQLayout, LayoutQ, copymutable_size import BlockArrays: AbstractBlockVecOrMat, sizes_from_blocks, _length, BlockedUnitRange, blockcolsupport, BlockLayout, AbstractBlockLayout, BlockSlice diff --git a/src/banded/infqltoeplitz.jl b/src/banded/infqltoeplitz.jl index ccf037f..062baf0 100644 --- a/src/banded/infqltoeplitz.jl +++ b/src/banded/infqltoeplitz.jl @@ -83,6 +83,9 @@ function ql_pruneband(A; kwds...) Q, H end + +copymutable_size(::NTuple{2,InfiniteCardinal{0}}, Q) = cache(Q) + # represent Q as a product of orthogonal operations struct ProductQ{T,QQ<:Tuple} <: LayoutQ{T} Qs::QQ @@ -141,7 +144,6 @@ mul(Q::ProductQ, X::AbstractMatrix) = ApplyArray(*, Q.Qs...) * X mul(X::AbstractMatrix, Q::ProductQ) = X * ApplyArray(*, Q.Qs...) - # LQ where Q is a product of orthogonal operations struct QLProduct{T,QQ<:Tuple,LL} <: Factorization{T} Qs::QQ diff --git a/test/test_infql.jl b/test/test_infql.jl index fe0e22c..a3dc5b0 100644 --- a/test/test_infql.jl +++ b/test/test_infql.jl @@ -197,6 +197,8 @@ using ArrayLayouts: TriangularLayout, UnknownLayout @test (Q*L)[1:10,1:10] ≈ A[1:10,1:10] @test (L*Q)[1:10,1:10] ≈ LazyBandedMatrices.SymTridiagonal(L*Q)[1:10,1:10] + @test Q[5,6:8] == [Q[5,k] for k = 6:8] + @test Q[6:8,5] == [Q[k,5] for k = 6:8] end @test_throws ErrorException ql(zeros(∞,∞))