From f143670ae283ad0dd25932d1455999cffce48b19 Mon Sep 17 00:00:00 2001 From: Stefan Krastanov Date: Wed, 19 Jun 2024 10:44:05 -0400 Subject: [PATCH] cleanup --- src/LDPCDecoders.jl | 1 - src/parity.jl | 26 -------------------------- test/test_jet.jl | 2 +- 3 files changed, 1 insertion(+), 28 deletions(-) delete mode 100644 src/parity.jl diff --git a/src/LDPCDecoders.jl b/src/LDPCDecoders.jl index 7ff316d..86b70df 100644 --- a/src/LDPCDecoders.jl +++ b/src/LDPCDecoders.jl @@ -15,7 +15,6 @@ export BitFlipDecoder include("generator.jl") -include("parity.jl") include("bp_decoder.jl") include("bp_simulator.jl") include("it_decoder.jl") diff --git a/src/parity.jl b/src/parity.jl deleted file mode 100644 index 1e4ff59..0000000 --- a/src/parity.jl +++ /dev/null @@ -1,26 +0,0 @@ -function hamming_to_parity(rank) - num_rows = 2^rank - 1 - - parity = zeros(Int, num_rows, rank) - - for i in range(1, num_rows) - digits = base2(i, rank) - - for j in range(1, rank) - parity[i, j] = digits[j] - end - end - - return transpose(parity) -end - -function repetition_to_parity(distance) - parity = zeros(distance - 1, distance) - - for i in range(1, distance - 1) - parity[i, i] = 1 - parity[i, i + 1] = 1 - end - - return parity -end diff --git a/test/test_jet.jl b/test/test_jet.jl index d5a8874..1ac2459 100644 --- a/test/test_jet.jl +++ b/test/test_jet.jl @@ -31,5 +31,5 @@ end ) @show rep @test_broken length(JET.get_reports(rep)) == 0 - @test length(JET.get_reports(rep)) <= 12 + @test length(JET.get_reports(rep)) <= 2 end