class property galois.FieldArray.elements : FieldArray

All of the finite field’s elements \(\{0, \dots, p^m-1\}\).

Examples

All elements of the prime field \(\mathrm{GF}(31)\) in increasing order.

In [1]: GF = galois.GF(31)

In [2]: GF.elements
Out[2]: 
GF([ 0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16,
    17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30], order=31)

All elements of the extension field \(\mathrm{GF}(5^2)\) in lexicographically-increasing order.

In [3]: GF = galois.GF(5**2, display="poly")

In [4]: GF.elements
Out[4]: 
GF([     0,      1,      2,      3,      4,      α,  α + 1,  α + 2,
     α + 3,  α + 4,     2α, 2α + 1, 2α + 2, 2α + 3, 2α + 4,     3α,
    3α + 1, 3α + 2, 3α + 3, 3α + 4,     4α, 4α + 1, 4α + 2, 4α + 3,
    4α + 4], order=5^2)

Last update: Aug 27, 2022