|
1 | | -using ArrayLayouts |
2 | | -using BlockBandedMatrices |
3 | | -using Test |
4 | | - |
5 | | -import BlockBandedMatrices: BandedBlockBandedRowMajor, |
6 | | - BandedBlockBandedRows, |
7 | | - BandedBlockBandedColumns, |
8 | | - BlockBandedRows, |
9 | | - BlockBandedColumns |
| 1 | +using ArrayLayouts, BlockBandedMatrices, Test |
| 2 | +import BlockBandedMatrices: BandedBlockBandedRowMajor, BandedBlockBandedRows, |
| 3 | + BandedBlockBandedColumns, BlockBandedRows, |
| 4 | + BlockBandedColumns, blockcolsupport, blockrowsupport |
10 | 5 |
|
11 | 6 | @testset "Adj/Trans" begin |
12 | 7 | @testset "BandedBlockBanded" begin |
@@ -45,4 +40,25 @@ import BlockBandedMatrices: BandedBlockBandedRowMajor, |
45 | 40 | @test BlockBandedMatrix(A') == A' |
46 | 41 | @test BlockBandedMatrix(transpose(A)) == transpose(A) |
47 | 42 | end |
| 43 | + |
| 44 | + @testset "blockcolsupport" begin |
| 45 | + D_y = BandedBlockBandedMatrix{Float64}(undef, Fill(2,81), [3; Fill(2,79)], (0,0), (0,1)) |
| 46 | + @test colsupport(D_y, 161) == 159:160 |
| 47 | + @test rowsupport(D_y, 162) == 162:161 |
| 48 | + @test colsupport(D_y', 162) == 162:161 |
| 49 | + @test rowsupport(D_y', 161) == 159:160 |
| 50 | + |
| 51 | + @test blockcolsupport(D_y, Block(80)) == Block.(80:80) |
| 52 | + @test blockrowsupport(D_y, Block(81)) == Block.(81:80) |
| 53 | + @test blockcolsupport(D_y', Block(81)) == Block.(81:80) |
| 54 | + @test blockrowsupport(D_y', Block(80)) == Block.(80:80) |
| 55 | + |
| 56 | + E1 = BandedBlockBandedMatrix{Float64}(undef, Int[], [1], (0,0), (0,1)) |
| 57 | + @test colsupport(E1, 1) == 1:0 |
| 58 | + @test rowsupport(E1', 1) == 1:0 |
| 59 | + |
| 60 | + E2 = BandedBlockBandedMatrix{Float64}(undef, [1], Int[], (0,0), (0,1)) |
| 61 | + @test rowsupport(E2, 1) == 1:0 |
| 62 | + @test colsupport(E2', 1) == 1:0 |
| 63 | + end |
48 | 64 | end |
0 commit comments