Skip to content

Commit 5c1b5d0

Browse files
authored
Support Q[::Int, ::AbstractRange] and variants (#148)
* Support Q[::Int, ::AbstractRange] and variants * LazyBandedMatrices v0.9 * v0.6.25 * Require Julia v1.9
1 parent c053ac7 commit 5c1b5d0

File tree

5 files changed

+12
-9
lines changed

5 files changed

+12
-9
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ jobs:
3838
fail-fast: false
3939
matrix:
4040
version:
41-
- '1.6'
42-
- '1'
41+
- '1.9'
4342
os:
4443
- ubuntu-latest
4544
- macOS-latest

Project.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "InfiniteLinearAlgebra"
22
uuid = "cde9dba0-b1de-11e9-2c62-0bab9446c55c"
3-
version = "0.6.24"
3+
version = "0.7"
44

55
[deps]
66
ArrayLayouts = "4c555306-a7a7-4459-81d9-ec55ddd5c99a"
@@ -24,10 +24,10 @@ BlockBandedMatrices = "0.12"
2424
FillArrays = "1"
2525
InfiniteArrays = "0.13"
2626
LazyArrays = "1.3"
27-
LazyBandedMatrices = "0.8.7"
28-
MatrixFactorizations = "1, 2"
27+
LazyBandedMatrices = "0.8.7, 0.9"
28+
MatrixFactorizations = "2.1"
2929
SemiseparableMatrices = "0.3"
30-
julia = "1.6"
30+
julia = "1.9"
3131

3232
[extras]
3333
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"

src/InfiniteLinearAlgebra.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ import BandedMatrices: BandedMatrix, _BandedMatrix, AbstractBandedMatrix, banded
1616
_default_banded_broadcast, banded_similar
1717
import FillArrays: AbstractFill, getindex_value, axes_print_matrix_row
1818
import InfiniteArrays: OneToInf, InfUnitRange, Infinity, PosInfinity, InfiniteCardinal, InfStepRange, AbstractInfUnitRange, InfAxes, InfRanges
19-
import LinearAlgebra: matprod, qr, AbstractTriangular, AbstractQ, adjoint, transpose, AdjOrTrans
19+
import LinearAlgebra: matprod, qr, AbstractTriangular, AbstractQ, adjoint, transpose, AdjOrTrans, copymutable
2020
import LazyArrays: applybroadcaststyle, CachedArray, CachedMatrix, CachedVector, DenseColumnMajor, FillLayout, ApplyMatrix, check_mul_axes, LazyArrayStyle,
2121
resizedata!, MemoryLayout, AbstractLazyLayout,
2222
factorize, sub_materialize, LazyLayout, LazyArrayStyle, layout_getindex,
2323
applylayout, ApplyLayout, PaddedLayout, CachedLayout, AbstractCachedVector, AbstractCachedMatrix, cacheddata, zero!, MulAddStyle, ApplyArray,
2424
LazyArray, LazyMatrix, LazyVector, paddeddata, arguments, resizedata!, simplifiable, simplify, LazyLayouts
2525
import MatrixFactorizations: ul, ul!, _ul, ql, ql!, _ql, QLPackedQ, getL, getR, getQ, getU, reflector!, reflectorApply!, QL, QR, QRPackedQ,
26-
QRPackedQLayout, AdjQRPackedQLayout, QLPackedQLayout, AdjQLPackedQLayout, LayoutQ
26+
QRPackedQLayout, AdjQRPackedQLayout, QLPackedQLayout, AdjQLPackedQLayout, LayoutQ, copymutable_size
2727

2828
import BlockArrays: AbstractBlockVecOrMat, sizes_from_blocks, _length, BlockedUnitRange, blockcolsupport, BlockLayout, AbstractBlockLayout, BlockSlice
2929

src/banded/infqltoeplitz.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ function ql_pruneband(A; kwds...)
8383
Q, H
8484
end
8585

86+
87+
copymutable_size(::NTuple{2,InfiniteCardinal{0}}, Q) = cache(Q)
88+
8689
# represent Q as a product of orthogonal operations
8790
struct ProductQ{T,QQ<:Tuple} <: LayoutQ{T}
8891
Qs::QQ
@@ -141,7 +144,6 @@ mul(Q::ProductQ, X::AbstractMatrix) = ApplyArray(*, Q.Qs...) * X
141144
mul(X::AbstractMatrix, Q::ProductQ) = X * ApplyArray(*, Q.Qs...)
142145

143146

144-
145147
# LQ where Q is a product of orthogonal operations
146148
struct QLProduct{T,QQ<:Tuple,LL} <: Factorization{T}
147149
Qs::QQ

test/test_infql.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,8 @@ using ArrayLayouts: TriangularLayout, UnknownLayout
197197
@test (Q*L)[1:10,1:10] A[1:10,1:10]
198198

199199
@test (L*Q)[1:10,1:10] LazyBandedMatrices.SymTridiagonal(L*Q)[1:10,1:10]
200+
@test Q[5,6:8] == [Q[5,k] for k = 6:8]
201+
@test Q[6:8,5] == [Q[k,5] for k = 6:8]
200202
end
201203

202204
@test_throws ErrorException ql(zeros(∞,∞))

0 commit comments

Comments
 (0)