Skip to content

Commit 66b2444

Browse files
authored
Revert "Revert "test rect ∞ DiagTrav"" (#120)
This reverts commit 6668bee.
1 parent 6668bee commit 66b2444

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ DSP = "0.7"
2626
FillArrays = "0.13"
2727
InfiniteArrays = "0.12"
2828
LazyArrays = "0.22"
29-
LazyBandedMatrices = "0.8.1"
29+
LazyBandedMatrices = "0.8.4"
3030
MatrixFactorizations = "0.9.2"
3131
SemiseparableMatrices = "0.3"
3232
julia = "1.6"

test/runtests.jl

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import InfiniteLinearAlgebra: qltail, toeptail, tailiterate, tailiterate!, tail_
55
rightasymptotics, QLHessenberg, ConstRows, PertConstRows, chop, chop!,
66
BandedToeplitzLayout, PertToeplitzLayout, TridiagonalToeplitzLayout, BidiagonalToeplitzLayout
77
import Base: BroadcastStyle
8-
import BlockArrays: _BlockArray
8+
import BlockArrays: _BlockArray, blockcolsupport
99
import BlockBandedMatrices: isblockbanded, _BlockBandedMatrix
1010
import MatrixFactorizations: QLPackedQ
1111
import BandedMatrices: bandeddata, _BandedMatrix, BandedStyle
@@ -100,6 +100,24 @@ include("test_infbanded.jl")
100100
@test B[Block.(1:10), Block.(1:10)] isa BlockSkylineMatrix
101101
end
102102

103+
@testset "DiagTrav" begin
104+
C = zeros(∞,∞);
105+
C[1:3,1:4] .= [1 2 3 4; 5 6 7 8; 9 10 11 12]
106+
A = DiagTrav(C)
107+
@test blockcolsupport(A) == Block.(1:6)
108+
@test A[Block.(1:7)] == [1; 5; 2; 9; 6; 3; 0; 10; 7; 4; 0; 0; 11; 8; 0; 0; 0; 0; 12; zeros(9)]
109+
110+
C = zeros(∞,4);
111+
C[1:3,1:4] .= [1 2 3 4; 5 6 7 8; 9 10 11 12]
112+
A = DiagTrav(C)
113+
@test A[Block.(1:7)] == [1; 5; 2; 9; 6; 3; 0; 10; 7; 4; 0; 0; 11; 8; 0; 0; 0; 12; zeros(4)]
114+
115+
C = zeros(3,∞);
116+
C[1:3,1:4] .= [1 2 3 4; 5 6 7 8; 9 10 11 12]
117+
A = DiagTrav(C)
118+
@test A[Block.(1:7)] == [1; 5; 2; 9; 6; 3; 10; 7; 4; 11; 8; 0; 12; zeros(5)]
119+
end
120+
103121
@testset "KronTrav" begin
104122
Δ = BandedMatrix(1 => Ones(∞), -1 => Ones(∞)) / 2
105123
A = KronTrav- 2I, Eye(∞))

0 commit comments

Comments
 (0)