Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix adjtransvec multiplication with AbstractZerosMatrix #341

Merged
merged 2 commits into from
Apr 25, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Add three-term mul tests
jishnub committed Apr 25, 2024
commit d6ce6e56c46bfa8a78a9b6e0868c7a9538e80f04
14 changes: 12 additions & 2 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1708,6 +1708,8 @@ end
Ank = rand(T, n, k)
Akn = rand(T, k, n)
Ak = rand(T, k)
onesm = ones(m)
zerosm = zeros(m)

fv = T == Float64 ? T(1.6) : T(1.6, 1.3)

@@ -1722,9 +1724,17 @@ end

for A in (Akn, Ak)
@test transpose(A)*fillvec ≈ transpose(A)*Afillvec
@test transpose(A)*fillmat ≈ transpose(A)*Afillmat
AtF = transpose(A)*fillmat
AtM = transpose(A)*Afillmat
@test AtF ≈ AtM
@test AtF * Ones(m) ≈ AtM * onesm
@test AtF * Zeros(m) ≈ AtM * zerosm
@test adjoint(A)*fillvec ≈ adjoint(A)*Afillvec
@test adjoint(A)*fillmat ≈ adjoint(A)*Afillmat
AadjF = adjoint(A)*fillmat
AadjM = adjoint(A)*Afillmat
@test AadjF ≈ AadjM
@test AadjF * Ones(m) ≈ AadjM * onesm
@test AadjF * Zeros(m) ≈ AadjM * zerosm
end
end