The parity check matrix has to be of shape (n-k), where n is the LDPC block length and k is the information codeword length.
However, the code generates different shapes if I am not wrong.
Setting n to 20, d_v to 4, and d_c to 5 yields H of shape (ceil(n*d_v/d_c), n) which is (16, 20), and G with shape (20, 7)!?
Do not forget that for each generator matrix G of shape (k,n) there exist parity check matrix H of shape ((n-k),n).
The parity check matrix has to be of shape (n-k), where n is the LDPC block length and k is the information codeword length.
However, the code generates different shapes if I am not wrong.
Setting n to 20, d_v to 4, and d_c to 5 yields H of shape (ceil(n*d_v/d_c), n) which is (16, 20), and G with shape (20, 7)!?
Do not forget that for each generator matrix G of shape (k,n) there exist parity check matrix H of shape ((n-k),n).