Skip to content

Commit 7a00b8f

Browse files
committed
increase cov
1 parent f4e975f commit 7a00b8f

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

ext/InfiniteArraysBlockArraysExt.jl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,7 @@ sizes_from_blocks(A::AbstractVector, ::Tuple{OneToInf{Int}}) = (map(length,A),)
3838
length(::BlockedOneTo{Int,<:InfRanges}) = ℵ₀
3939

4040
const OneToInfBlocks = BlockedOneTo{Int,OneToInfCumsum}
41-
const OneToBlocks = BlockedOneTo{Int,OneToCumsum}
42-
4341
axes(a::OneToInfBlocks) = (a,)
44-
axes(a::OneToBlocks) = (a,)
4542

4643

4744
sub_materialize(_, V, ::Tuple{BlockedOneTo{Int,<:InfRanges}}) = V
@@ -51,7 +48,7 @@ function sub_materialize(::PaddedColumns, v::AbstractVector{T}, ax::Tuple{Blocke
5148
BlockedVector(Vcat(sub_materialize(dat), Zeros{T}(∞)), ax)
5249
end
5350

54-
BlockArrays.dimlength(start, ::Infinity) = ℵ₀
51+
# BlockArrays.dimlength(start, ::Infinity) = ℵ₀
5552

5653
function copy(bc::Broadcasted{<:BroadcastStyle,<:Any,typeof(*),<:Tuple{Ones{T,1,Tuple{OneToInfBlocks}},AbstractArray{V,N}}}) where {N,T,V}
5754
a,b = bc.args

test/test_infblock.jl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,19 @@ const BlockTriPertToeplitz = InfiniteArraysBlockArraysExt.BlockTriPertToeplitz
157157
@test (im*I+A)[1:100, 1:100] == im * I + A[1:100, 1:100]
158158
@test (im*I-A)[1:100, 1:100] == im * I - A[1:100, 1:100]
159159

160+
@test (A'-I)[1:100, 1:100] == A'[1:100, 1:100] - I
161+
@test (A'+I)[1:100, 1:100] == A'[1:100, 1:100] + I
162+
@test (I+A')[1:100, 1:100] == I + A'[1:100, 1:100]
163+
@test (I-A')[1:100, 1:100] == I - A'[1:100, 1:100]
164+
160165
@test BlockTridiagonal(A')[Block.(1:10),Block.(1:10)] == A[Block.(1:10),Block.(1:10)]'
161166
end
167+
168+
@testset "Bi/Diagonal mortar" begin
169+
A = mortar(Diagonal(Fill([1 2; 3 4], ∞)))
170+
@test A[Block(1,1)] == [1 2; 3 4]
171+
172+
B = mortar(Bidiagonal(Fill([1 2; 3 4], ∞), Fill([1 2; 3 4], ∞), :U))
173+
@test B[Block(1,1)] == [1 2; 3 4]
174+
end
162175
end

0 commit comments

Comments
 (0)