galois.parity_check_to_generator_matrix¶
- galois.parity_check_to_generator_matrix(H)¶
Converts the parity-check matrix \(\mathbf{H}\) of a linear \([n, k]\) code into its generator matrix \(\mathbf{G}\).
The generator and parity-check matrices satisfy the equations \(\mathbf{G}\mathbf{H}^T = \mathbf{0}\).
- Parameters
H (galois.FieldArray) – The \((n-k, n)\) parity-check matrix \(\mathbf{G}\) in systematic form \(\mathbf{H} = [-\mathbf{P}_{k,n-k}^T\ |\ \mathbf{I}_{n-k,n-k}]\).
- Returns
The \((k, n)\) generator matrix \(\mathbf{G} = [\mathbf{I}_{k,k}\ |\ \mathbf{P}_{k,n-k}]\).
- Return type