classmethod galois.Array.repr(element_repr: Literal[int] | Literal[poly] | Literal[power] = 'int') Generator[None, None, None]

Sets the element representation for all arrays from this FieldArray subclass.

Parameters:
element_repr: Literal[int] | Literal[poly] | Literal[power] = 'int'

The field element representation.

Slower performance

To display elements in the power representation, galois must compute the discrete logarithm of each element displayed. For large fields or fields using explicit calculation, this process can take a while. However, when using lookup tables this representation is just as fast as the others.

Returns:

A context manager for use in a with statement. If permanently setting the element representation, disregard the return value.

Notes

This function updates element_repr.