Skip to content

Commit 0f9c465

Browse files
committed
bandwidth info
1 parent cdabca3 commit 0f9c465

File tree

4 files changed

+15
-2
lines changed

4 files changed

+15
-2
lines changed

src/InfiniteLinearAlgebra.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import Base.Broadcast: BroadcastStyle
88

99
import InfiniteArrays: OneToInf, InfUnitRange, Infinity, InfStepRange
1010
import FillArrays: AbstractFill
11-
import BandedMatrices: BandedMatrix, _BandedMatrix, bandeddata
11+
import BandedMatrices: BandedMatrix, _BandedMatrix, bandeddata, bandwidths
1212
import LinearAlgebra: lmul!, ldiv!, matprod, qr, AbstractTriangular, AbstractQ, adjoint, transpose
1313
import LazyArrays: CachedArray, DenseColumnMajor, FillLayout, ApplyMatrix, check_mul_axes, ApplyStyle, LazyArrayApplyStyle, LazyArrayStyle,
1414
CachedMatrix, CachedArray, resizedata!, MemoryLayout

src/infqr.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ struct AdaptiveQRFactors{T,DM<:AbstractMatrix{T},M<:AbstractMatrix{T}} <: Abstra
3535
end
3636

3737
size(F::AdaptiveQRFactors) = size(F.data.data)
38+
bandwidths(F::AdaptiveQRFactors) = bandwidths(F.data.data)
3839
function getindex(F::AdaptiveQRFactors, k::Int, j::Int)
3940
partialqr!(F.data, j)
4041
F.data.data[k,j]

test/runtests.jl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ using InfiniteLinearAlgebra, BlockBandedMatrices, BlockArrays, BandedMatrices, I
22
import InfiniteLinearAlgebra: qltail, toeptail, tailiterate , tailiterate!, tail_de, ql_X!,
33
InfToeplitz, PertToeplitz, TriToeplitz, InfBandedMatrix,
44
rightasymptotics, QLHessenberg
5+
import BlockArrays: _BlockArray
56
import BlockBandedMatrices: isblockbanded, _BlockBandedMatrix
67
import MatrixFactorizations: QLPackedQ
78
import BandedMatrices: bandeddata, _BandedMatrix
@@ -45,6 +46,15 @@ import BandedMatrices: bandeddata, _BandedMatrix
4546
@test A*A isa ApplyArray
4647
@test (A^2)[1:10,1:10] == (A*A)[1:10,1:10] == (A[1:100,1:100]^2)[1:10,1:10]
4748
@test (A^3)[1:10,1:10] == (A*A*A)[1:10,1:10] == (A[1:100,1:100]^3)[1:10,1:10]
49+
50+
@testset "Triangle OP recurrences" begin
51+
mortar((n -> 1:n).(1:∞))
52+
end
53+
# Multivariate OPs Corollary (3)
54+
# n = 5
55+
# BlockTridiagonal(Zeros.(1:∞,2:∞),
56+
# (n -> Diagonal(((n+2).+(0:n)))/ (2n + 2)).(0:∞),
57+
# Zeros.(2:∞,1:∞))
4858
end
4959

5060
include("test_hessenbergq.jl")

test/test_infqr.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ import InfiniteLinearAlgebra: partialqr!, AdaptiveQRData
3131
@test F.τ[1] 1+sqrt(2)/2
3232
@test F.τ[100] qrunblocked(A[1:101,1:100]).τ[100]
3333
Q,R = F;
34-
34+
@test bandwidths(R) == (0,2)
35+
@test size(R) == (∞,∞)
36+
@test R[1,1] == -sqrt(2)
3537
end
3638
end
3739

0 commit comments

Comments
 (0)