generate_rm_code#
- sionna.phy.fec.polar.utils.generate_rm_code(r: int, m: int) Tuple[numpy.ndarray, numpy.ndarray, int, int, int][source]#
Generate frozen positions of the (r, m) Reed Muller (RM) code.
- Parameters:
- Outputs:
frozen_pos – Array of ints of shape [n-k] containing the frozen position indices.
info_pos – Array of ints of shape [k] containing the information position indices.
n – The resulting codeword length.
k – The number of information bits.
d_min – The minimum distance of the code.
- Raises:
TypeError – If
rormare not int.ValueError – If
r>morr< 0 orm< 0.
Examples
from sionna.phy.fec.polar.utils import generate_rm_code frozen_pos, info_pos, n, k, d_min = generate_rm_code(r=1, m=4) print(f"n={n}, k={k}, d_min={d_min}") # n=16, k=5, d_min=8