property galois.BCH.is_narrow_sense : bool

Indicates if the BCH code is narrow sense, meaning the roots of the generator polynomial are consecutive powers of \(\alpha\) starting at 1, i.e. \(\alpha, \alpha^2, \dots, \alpha^{2t}\).

Examples

In [1]: bch = galois.BCH(15, 7); bch
Out[1]: <BCH Code: [15, 7, 5] over GF(2)>

In [2]: bch.is_narrow_sense
Out[2]: True

In [3]: bch.roots
Out[3]: GF([2, 4, 8, 3], order=2^4)

In [4]: bch.field.primitive_element**(np.arange(1, 2*bch.t + 1))
Out[4]: GF([2, 4, 8, 3], order=2^4)