optic.comm.fec.encodeTriang
- encodeTriang(bits, P1, P2)
Encode binary sequences using two parity matrices for LDPC encoding.
- Parameters:
bits (np.array of shape (k, N)) – Binary input sequences. Each column is a bit sequence to be encoded.
P1 (np.array of shape (m1, k)) – First parity matrix.
P2 (np.array of shape (m2, k)) – Second parity matrix.
- Returns:
codewords – Encoded codewords, one per column.
- Return type:
np.array of shape (k + m1 + m2, N)
References
[1] T. J. Richardson and R. L. Urbanke, “Efficient encoding of low-density parity-check codes,” IEEE Transactions on Information Theory, vol. 47, no. 2, pp. 638-656, Feb 2001.