classmethod galois.FieldArray.Vandermonde(element: ElementLike, rows: int, cols: int, dtype: DTypeLike | None = None) Self

Creates an \(m \times n\) Vandermonde matrix of \(a \in \mathrm{GF}(q)\).

Parameters
element: ElementLike

An element \(a\) of \(\mathrm{GF}(q)\).

rows: int

The number of rows \(m\) in the Vandermonde matrix.

cols: int

The number of columns \(n\) in the Vandermonde matrix.

dtype: DTypeLike | None = None

The numpy.dtype of the array elements. The default is None which represents the smallest unsigned data type for this FieldArray subclass (the first element in dtypes).

Returns

A \(m \times n\) Vandermonde matrix.

Examples

In [1]: GF = galois.GF(2**3)

In [2]: a = GF.primitive_element; a
Out[2]: GF(2, order=2^3)

In [3]: V = GF.Vandermonde(a, 7, 7); V
Out[3]: 
GF([[1, 1, 1, 1, 1, 1, 1],
    [1, 2, 4, 3, 6, 7, 5],
    [1, 4, 6, 5, 2, 3, 7],
    [1, 3, 5, 4, 7, 2, 6],
    [1, 6, 2, 7, 4, 5, 3],
    [1, 7, 3, 2, 5, 6, 4],
    [1, 5, 7, 6, 3, 4, 2]], order=2^3)
In [4]: GF = galois.GF(2**3)

In [5]: a = GF.primitive_element; a
Out[5]: GF(α, order=2^3)

In [6]: V = GF.Vandermonde(a, 7, 7); V
Out[6]: 
GF([[          1,           1,           1,           1,           1,           1,           1],
    [          1,           α,         α^2,       α + 1,     α^2 + α, α^2 + α + 1,     α^2 + 1],
    [          1,         α^2,     α^2 + α,     α^2 + 1,           α,       α + 1, α^2 + α + 1],
    [          1,       α + 1,     α^2 + 1,         α^2, α^2 + α + 1,           α,     α^2 + α],
    [          1,     α^2 + α,           α, α^2 + α + 1,         α^2,     α^2 + 1,       α + 1],
    [          1, α^2 + α + 1,       α + 1,           α,     α^2 + 1,     α^2 + α,         α^2],
    [          1,     α^2 + 1, α^2 + α + 1,     α^2 + α,       α + 1,         α^2,           α]], order=2^3)
In [7]: GF = galois.GF(2**3)

In [8]: a = GF.primitive_element; a
Out[8]: GF(α, order=2^3)

In [9]: V = GF.Vandermonde(a, 7, 7); V
Out[9]: 
GF([[  1,   1,   1,   1,   1,   1,   1],
    [  1,   α, α^2, α^3, α^4, α^5, α^6],
    [  1, α^2, α^4, α^6,   α, α^3, α^5],
    [  1, α^3, α^6, α^2, α^5,   α, α^4],
    [  1, α^4,   α, α^5, α^2, α^6, α^3],
    [  1, α^5, α^3,   α, α^6, α^4, α^2],
    [  1, α^6, α^5, α^4, α^3, α^2,   α]], order=2^3)