galois.is_monic¶
- class galois.is_monic(poly)¶
Determines whether the polynomial is monic, i.e. having leading coefficient equal to 1.
- Parameters
poly (galois.Poly) – A polynomial over a Galois field.
- Returns
True
if the polynomial is monic.- Return type
Examples
In [510]: GF = galois.GF(7) In [511]: p = galois.Poly([1,0,4,5], field=GF); p Out[511]: Poly(x^3 + 4x + 5, GF(7)) In [512]: galois.is_monic(p) Out[512]: True
In [513]: p = galois.Poly([3,0,4,5], field=GF); p Out[513]: Poly(3x^3 + 4x + 5, GF(7)) In [514]: galois.is_monic(p) Out[514]: False