Skip to content

Commit

Permalink
polish test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
Fe-r-oz committed Jan 22, 2025
1 parent 8b10a15 commit 3c9bd89
Showing 1 changed file with 28 additions and 26 deletions.
54 changes: 28 additions & 26 deletions test/test_ecc_delfosse_generalized_reedmuller.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,39 +7,41 @@
using Nemo: matrix, GF, echelon_form

@testset "Testing [[8rp, (8r − 2)p − 2m, 4]] DelfosseRepCode properties" begin
# test code family [16p, 14p − 8, 4]] code that uses RM(2,4)
for i in 2:100
for m in [4]
for r in [2]
p = i
n = 8*r*p
k = (8*r 2)*p 2*m
stab = parity_checks(DelfosseGeneralizedReedMuller(p,r,m))
H = stab_to_gf2(stab)
mat = matrix(GF(2), H)
computed_rank = rank(mat)
@test computed_rank == n - k
@testset "test [16p, 14p − 8, 4]] code family that uses RM(2,4)" begin
for i in 2:100
for m in [4]
for r in [2]
p = i
n = 8*r*p
k = (8*r 2)*p 2*m
stab = parity_checks(DelfosseGeneralizedReedMuller(p,r,m))
H = stab_to_gf2(stab)
mat = matrix(GF(2), H)
computed_rank = rank(mat)
@test computed_rank == n - k
end
end
end
end

# test code family [[8p, 6(p−1), 4]] code that uses RM(1,3)
for i in 2:100
for m in [3]
for r in [1]
p = i
n = 8*r*p
k = (8*r 2)*p 2*m
stab = parity_checks(DelfosseGeneralizedReedMuller(p,r,m))
H = stab_to_gf2(stab)
mat = matrix(GF(2), H)
computed_rank = rank(mat)
@test computed_rank == n - k
@testset "test [[8p, 6(p−1), 4]] code family that uses RM(1,3)" begin
for i in 2:100
for m in [3]
for r in [1]
p = i
n = 8*r*p
k = (8*r 2)*p 2*m
stab = parity_checks(DelfosseGeneralizedReedMuller(p,r,m))
H = stab_to_gf2(stab)
mat = matrix(GF(2), H)
computed_rank = rank(mat)
@test computed_rank == n - k
end
end
end
end
# crosscheck parity check matrices from VIII. 2 Generalizing the
# [8, 4, 4] and [16, 11, 4] classical codes, pg. 11 of https://arxiv.org/pdf/2008.05051
# crosscheck parity check matrices from VIII. 2 Generalizing the [8, 4, 4]
# and [16, 11, 4] classical codes, pg. 11 of https://arxiv.org/pdf/2008.05051
r = 1
m = 3
blocks = 2
Expand Down

0 comments on commit 3c9bd89

Please sign in to comment.