We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2984203 commit b6db6b1Copy full SHA for b6db6b1
test/unit_tests/matrix_helpers.jl
@@ -14,6 +14,7 @@ m = 5
14
# commutation matrix multiplication
15
K = CommutationMatrix(n)
16
B = rand(n, n)
17
+ @test_throws DimensionMismatch K * rand(n, m)
18
@test K * vec(B) == vec(B')
19
C = sprand(n, n, 0.5)
20
@test K * vec(C) == vec(C')
@@ -27,10 +28,12 @@ end
27
28
@testset "Duplication / elimination matrix" begin
29
A = rand(m, m)
30
A = A * A'
31
+
32
# dupication
33
D = duplication_matrix(m)
34
@test D * A[tril(trues(size(A)))] == vec(A)
35
36
# elimination
- D = elimination_matrix(m)
- @test D * vec(A) == A[tril(trues(size(A)))]
37
+ E = elimination_matrix(m)
38
+ @test E * vec(A) == A[tril(trues(size(A)))]
39
end
0 commit comments