Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
bit-flipping decoding
#7
Hello everyone,
I would like to post today's update, in this program I can obtain the value of M[i_prime] when i != i_prime, but I am still stuck for representing line 11 of the algorithm into python

import numpy as np

#declaration of parity-check matrix
H = np.array([[1, 1, 0, 1, 0, 0], [0, 1, 1, 0, 1, 0],
            [1, 0, 0, 0, 1, 1], [0, 0, 1, 1, 0, 1]])

#setting the input and output of the LDPC
c = np.array([0, 0, 1, 0, 1, 1])
y = np.array([0, 1, 1, 0, 1, 1])

#initialization of bit flipping decoding
w_r = 2
w_c = 3
m = np.size(H,0)
N = np.size(H,1)
M = np.hsplit(y[::].copy(), N)
E = 0

#initializing value of B
B_j = np.where(H == 1)
B = B_j[1].reshape(m, w_c)

for j in range (m):
    for i in range (N):
        for i_prime in B[j]:
            if i != i_prime:
                print (M[i_prime], i, i_prime)
                E = M[i_prime] ^ M[i_prime + 1] #this part is for equation in line 11 of the algorithm
                print (E)
Reply


Messages In This Thread
bit-flipping decoding - by divon - Aug-18-2021, 08:16 AM
RE: bit-flipping decoding - by jefsummers - Aug-18-2021, 02:15 PM
RE: bit-flipping decoding - by divon - Aug-19-2021, 02:16 AM
RE: bit-flipping decoding - by Larz60+ - Aug-18-2021, 06:57 PM
RE: bit-flipping decoding - by divon - Aug-19-2021, 02:31 AM
RE: bit-flipping decoding - by divon - Aug-19-2021, 10:32 AM
RE: bit-flipping decoding - by divon - Aug-20-2021, 08:40 AM
RE: bit-flipping decoding - by divon - Aug-24-2021, 11:33 PM
RE: bit-flipping decoding - by divon - Aug-25-2021, 12:52 AM
RE: bit-flipping decoding - by Larz60+ - Aug-25-2021, 03:13 AM
RE: bit-flipping decoding - by divon - Aug-26-2021, 11:25 PM
RE: bit-flipping decoding - by Larz60+ - Aug-27-2021, 02:42 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  base64 decoding paul18fr 0 1,326 Mar-13-2022, 05:56 PM
Last Post: paul18fr

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020