Skip to content

Commit 5861590

Browse files
authored
Overload blocbanded_col/rowsupport for infinite case (#155)
1 parent f12ffb4 commit 5861590

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
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.7.2"
3+
version = "0.7.3"
44

55
[deps]
66
ArrayLayouts = "4c555306-a7a7-4459-81d9-ec55ddd5c99a"

src/blockbanded/blockbanded.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ function BlockArrays.sortedunion(b, ::AbstractVector{<:PosInfinity})
1212
end
1313
BlockArrays.sortedunion(a::OneToInfCumsum, ::OneToInfCumsum) = a
1414

15+
BlockBandedMatrices.blockbanded_colstop(A, x::InfiniteCardinal{0}) = x
16+
BlockBandedMatrices.blockbanded_rowstop(A, x::InfiniteCardinal{0}) = x
17+
1518

1619

1720
function BlockArrays.sortedunion(a::Vcat{Int,1,<:Tuple{Union{Int,AbstractVector{Int}},<:AbstractRange}},

test/runtests.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,8 @@ include("test_infbanded.jl")
231231
Dy = BlockBandedMatrices._BandedBlockBandedMatrix((k .+ (b + c))', axes(k, 1), (-1, 1), (-1, 1))
232232
N = 100
233233
@test Dy[Block.(1:N), Block.(1:N)] == BlockBandedMatrices._BandedBlockBandedMatrix((k.+(b+c))[Block.(1:N)]', axes(k, 1)[Block.(1:N)], (-1, 1), (-1, 1))
234+
@test colsupport(Dy, axes(Dy,2)) == 1:
235+
@test rowsupport(Dy, axes(Dy,1)) == 2:
234236
end
235237

236238
@testset "Symmetric" begin

0 commit comments

Comments
 (0)