galois.BCH(n: int, k: int, primitive_poly: PolyLike | None = None, primitive_element: PolyLike | None = None, systematic: bool = True)

Constructs a primitive, narrow-sense binary \(\textrm{BCH}(n, k)\) code.

Parameters
n: int

The codeword size \(n\), must be \(n = 2^m - 1\).

k: int

The message size \(k\).

primitive_poly: PolyLike | None = None

Optionally specify the primitive polynomial that defines the extension field \(\mathrm{GF}(2^m)\). The default is None which uses Matlab’s default, see matlab_primitive_poly().

primitive_element: PolyLike | None = None

Optionally specify the primitive element \(\alpha\) whose powers are roots of the generator polynomial \(g(x)\). The default is None which uses the lexicographically-minimal primitive element in \(\mathrm{GF}(2^m)\), see primitive_element().

systematic: bool = True

Optionally specify if the encoding should be systematic, meaning the codeword is the message with parity appended. The default is True.


Last update: Nov 10, 2022