Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "BlockBandedMatrices"
uuid = "ffab5731-97b5-5995-9138-79e8c1846df0"
version = "0.13.4"
version = "0.13.5"

[deps]
ArrayLayouts = "4c555306-a7a7-4459-81d9-ec55ddd5c99a"
Expand Down
4 changes: 2 additions & 2 deletions src/linalg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const SubBlockSkylineMatrix{T,LL,UU,R1,R2} =



function add_bandwidths(A::AbstractBlockBandedMatrix,B::AbstractBlockBandedMatrix)
function add_bandwidths(A, B)
Al,Au = colblockbandwidths(A)
Bl,Bu = colblockbandwidths(B)

Expand All @@ -24,7 +24,7 @@ function add_bandwidths(A::AbstractBlockBandedMatrix,B::AbstractBlockBandedMatri
l,u
end

function add_bandwidths(A::BlockBandedMatrix,B::BlockBandedMatrix)
function add_bandwidths(A::BlockBandedMatrix, B::BlockBandedMatrix)
l,u = blockbandwidths(A) .+ blockbandwidths(B)
Fill(l,blocksize(B,2)), Fill(u,blocksize(B,2))
end
Expand Down
12 changes: 12 additions & 0 deletions test/test_adjtransblockbanded.jl
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,18 @@ import BlockBandedMatrices: BandedBlockBandedRowMajor, BandedBlockBandedRows,
@test rowsupport(E2, 1) == 1:0
@test colsupport(E2', 1) == 1:0
end

@testset "Adj*BlockBanded" begin
R = BlockBandedMatrix{Float64}(undef, [1,1,2,2,3], 1:2:9, (0,0)); fill!(R, 0)
for K = 1:N
for k = 1:(K÷2)
R[Block(K,K)[k,2k-1]] = R[Block(K,K)[k,2K-2k+1]] = 1/sqrt(2)
end
isodd(K) && (R[Block(K,K)[K÷2+1,K]] = 1)
end
@test R'R == Matrix(R)'R
@test R*R' ≈ I
end
end

end # module