@@ -2,16 +2,16 @@ using InfiniteLinearAlgebra, BlockBandedMatrices, BlockArrays, BandedMatrices, I
2
2
MatrixFactorizations, ArrayLayouts, LinearAlgebra, Random, LazyBandedMatrices, StaticArrays
3
3
import InfiniteLinearAlgebra: qltail, toeptail, tailiterate, tailiterate!, tail_de, ql_X!,
4
4
InfToeplitz, PertToeplitz, TriToeplitz, InfBandedMatrix, InfBandCartesianIndices,
5
- rightasymptotics, QLHessenberg, ConstRows, PertConstRows, chop, chop!,
5
+ rightasymptotics, QLHessenberg, ConstRows, PertConstRows, chop, chop!, pad,
6
6
BandedToeplitzLayout, PertToeplitzLayout, TridiagonalToeplitzLayout, BidiagonalToeplitzLayout
7
- import Base: BroadcastStyle
7
+ import Base: BroadcastStyle, oneto
8
8
import BlockArrays: _BlockArray, blockcolsupport
9
9
import BlockBandedMatrices: isblockbanded, _BlockBandedMatrix
10
10
import MatrixFactorizations: QLPackedQ
11
11
import BandedMatrices: bandeddata, _BandedMatrix, BandedStyle
12
- import LazyArrays: colsupport, MemoryLayout, ApplyLayout, LazyArrayStyle, arguments
12
+ import LazyArrays: colsupport, MemoryLayout, ApplyLayout, LazyArrayStyle, arguments, paddeddata, PaddedLayout
13
13
import InfiniteArrays: OneToInf, oneto, RealInfinity
14
- import LazyBandedMatrices: BroadcastBandedBlockBandedLayout, BroadcastBandedLayout, LazyBandedLayout
14
+ import LazyBandedMatrices: BroadcastBandedBlockBandedLayout, BroadcastBandedLayout, LazyBandedLayout, BlockVec
15
15
16
16
using Aqua
17
17
@testset " Project quality" begin
32
32
c = PseudoBlockArray ([randn (5 ); zeros (10 )], (blockedrange (1 : 5 ),))
33
33
d = chop! (c, 0 )
34
34
@test length (d) == 6
35
+
36
+ @test pad (1 : 3 , 5 ) == [1 : 3 ; 0 ; 0 ]
37
+ @test pad (1 : 3 , oneto (∞)) isa Vcat
38
+ X = Matrix (reshape (1 : 6 , 3 , 2 ))
39
+ P = pad (X, oneto (3 ), oneto (∞))
40
+ @test P isa PaddedArray
41
+ P = pad (BlockVec (X), blockedrange (Fill (3 ,∞)))
42
+ @test P isa BlockVec
43
+ @test MemoryLayout (P) isa PaddedLayout
44
+ @test paddeddata (P) isa BlockVec
45
+ @test colsupport (P) == 1 : 6
46
+ P = pad (BlockVec (X' ), blockedrange (Fill (3 ,∞)))
47
+ @test P isa BlockVec{Int,<: Adjoint }
48
+ @test MemoryLayout (P) isa PaddedLayout
49
+ @test pad (BlockVec (transpose (X)), blockedrange (Fill (3 ,∞))) isa BlockVec{Int,<: Transpose }
35
50
end
36
51
37
52
include (" test_infconv.jl" )
0 commit comments