- property galois.BCH.alpha : FieldArray
A primitive \(n\)-th root of unity \(\alpha\) in \(\mathrm{GF}(q^m)\) whose consecutive powers \(\alpha^c, \dots, \alpha^{c+d-2}\) are roots of the generator polynomial \(g(x)\) in \(\mathrm{GF}(q^m)\).
Examples¶
Construct a binary primitive \(\textrm{BCH}(15, 7)\) code.
In [1]: bch = galois.BCH(15, 7); bch Out[1]: <BCH Code: [15, 7, 5] over GF(2)> In [2]: bch.alpha Out[2]: GF(2, order=2^4) In [3]: bch.roots[0] == bch.alpha ** bch.c Out[3]: np.True_ In [4]: bch.alpha.multiplicative_order() == bch.n Out[4]: True
Construct a non-primitive \(\textrm{BCH}(13, 7)\) code over \(\mathrm{GF}(3)\).
In [5]: bch = galois.BCH(13, 7, field=galois.GF(3)); bch Out[5]: <BCH Code: [13, 7, 4] over GF(3)> In [6]: bch.alpha Out[6]: GF(9, order=3^3) In [7]: bch.roots[0] == bch.alpha ** bch.c Out[7]: np.True_ In [8]: bch.alpha.multiplicative_order() == bch.n Out[8]: True