Skip to content

Commit

Permalink
test(matrices): add kms tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AnzhiZhang committed Aug 11, 2024
1 parent c39a280 commit 290965d
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions test/matrices/kms.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# constructors
@test allequal([
KMS(5),
KMS(5, 0.5),
KMS{Float64}(5),
KMS{Float64}(5, 0.5),
])

# linear algebra functions
run_test_linearalgrbra_functions(KMS.(1:5))

# eltype
@test test_matrix_elements(KMS{Float32}(5))

# content
@test KMS(5) [1.0 0.5 0.25 0.125 0.0625; 0.5 1.0 0.5 0.25 0.125; 0.25 0.5 1.0 0.5 0.25; 0.125 0.25 0.5 1.0 0.5; 0.0625 0.125 0.25 0.5 1.0]
@test KMS(5, 3) [1 3 9 27 81; 3 1 3 9 27; 9 3 1 3 9; 27 9 3 1 3; 81 27 9 3 1]

0 comments on commit 290965d

Please sign in to comment.