Aff3ct directly supports quasicyclic matrix definitions, so you don't need to expand the base matrix and generate an alist to parameterize your encoder.
See the documentation of the --dec-h-path
parameter, and the --enc-type
(esp. LDPC_QC
) parameter.
You can thus directly use tables 5.3.2-2 and 5.3.2-3 from ETSI TS 138 212 in a .qc file as explained in the --dec-h-path
documentation.
So, no need for an alist. If you, for some other purpose, need an alist, you'll have to implement the quasi-cyclic expansion. That's pretty straightforward, and even ETS TS 138 212 describes the process in 5.3.2 step 3):
The elements in $\mathbf H_{BG}$ with row and
column indices given in Table 5.3.2-2 (for LDPC base graph 1) and Table 5.3.2-3 (for LDPC base graph 2) are
of value 1, and all other elements in $\mathbf H_{BG}$ are of value 0.
The matrix $\mathbf H$ is obtained by replacing each element of $\mathbf H_{BG}$ with a $Z_c\times Z_c$ matrix, according to the following:
- Each element of value 0 in $\mathbf H_{BG}$ is replaced by an all zero matrix 0 of size $Z_c \times Z_c$;
- Each element of value 1 in $\mathbf H_{BG}$ is replaced by a circular permutation matrix $\mathbf I(P_{i , j})$ of size $Z_c\times Z_c$, where $i$ and $j$ are the row and column indices of the element, and $\mathbf I(P_{i , j})$ is obtained by circularly shifting the
identity matrix $\mathbf I$ of size … to the right $P_{i , j}$ times. >
The value of $P_{i , j}$ is given by $P_{i , j} =V_{i , j} \mod Z_c $ . The value of $V_{i , j}$ is given by Tables 5.3.2-2 and 5.3.2-3 according to the set index $i_{LS}$ and LDPC base graph.