- property galois.BCH.is_systematic : bool
Indicates if the code is systematic, meaning the codewords have parity appended to the message.
Examples¶
Construct a non-primitive \(\textrm{BCH}(13, 4)\) systematic code over \(\mathrm{GF}(3)\).
In [1]: bch = galois.BCH(13, 4, field=galois.GF(3)); bch Out[1]: <BCH Code: [13, 4, 7] over GF(3)> In [2]: bch.is_systematic Out[2]: True In [3]: bch.G Out[3]: GF([[1, 0, 0, 0, 2, 2, 1, 0, 2, 0, 1, 1, 0], [0, 1, 0, 0, 0, 2, 2, 1, 0, 2, 0, 1, 1], [0, 0, 1, 0, 1, 1, 1, 2, 2, 0, 1, 2, 1], [0, 0, 0, 1, 1, 2, 0, 1, 0, 2, 2, 0, 2]], order=3)
Construct a non-primitive \(\textrm{BCH}(13, 4)\) non-systematic code over \(\mathrm{GF}(3)\).
In [4]: bch = galois.BCH(13, 4, field=galois.GF(3), systematic=False); bch Out[4]: <BCH Code: [13, 4, 7] over GF(3)> In [5]: bch.is_systematic Out[5]: False In [6]: bch.G Out[6]: GF([[1, 1, 2, 0, 1, 0, 2, 2, 0, 2, 0, 0, 0], [0, 1, 1, 2, 0, 1, 0, 2, 2, 0, 2, 0, 0], [0, 0, 1, 1, 2, 0, 1, 0, 2, 2, 0, 2, 0], [0, 0, 0, 1, 1, 2, 0, 1, 0, 2, 2, 0, 2]], order=3) In [7]: bch.generator_poly Out[7]: Poly(x^9 + x^8 + 2x^7 + x^5 + 2x^3 + 2x^2 + 2, GF(3))