property galois.ReedSolomon.k : int

The message size \(k\) of the \([n, k, d]_q\) code. This is also called the code dimension.

Examples

Construct a \(\textrm{RS}(15, 9)\) code over \(\mathrm{GF}(2^4)\).

In [1]: rs = galois.ReedSolomon(15, 9); rs
Out[1]: <Reed-Solomon Code: [15, 9, 7] over GF(2^4)>

In [2]: rs.k
Out[2]: 9

Construct a \(\textrm{RS}(26, 18)\) code over \(\mathrm{GF}(3^3)\).

In [3]: rs = galois.ReedSolomon(26, 18, field=galois.GF(3**3)); rs
Out[3]: <Reed-Solomon Code: [26, 18, 9] over GF(3^3)>

In [4]: rs.k
Out[4]: 18