make_systematic#
- sionna.phy.fec.utils.make_systematic(mat: numpy.ndarray, is_pcm: bool = False) Tuple[numpy.ndarray, List[List[int]]][source]#
Converts a binary matrix to its systematic form.
This function transforms a binary matrix into systematic form, where the first k columns (or last k columns if
is_pcmis True) form an identity matrix.- Parameters:
mat (numpy.ndarray) – Binary matrix of shape [k, n] to be transformed to systematic form.
is_pcm (bool) – If True,
matis treated as a parity-check matrix, and the identity part will be placed in the last k columns.
- Outputs:
mat_sys – The systematic matrix.
column_swaps – A list of column swap operations performed.
Notes
This function may swap columns of the input matrix to achieve systematic form. As a result, the output matrix represents a permuted version of the code, defined by the
column_swapslist. To revert to the original column order, apply the inverse permutation in reverse order of the swaps. Ifis_pcmis True, indicating a parity-check matrix, the identity matrix portion will be arranged in the last k columns.