UGaloisField constructor
Implementation
UGaloisField(this.size, int primitive, this.generatorBase)
: _exp = Int32List(size),
_log = Int32List(size) {
int x = 1;
for (int i = 0; i < size - 1; i++) {
_exp[i] = x;
x <<= 1;
if (x >= size) x = (x ^ primitive) & (size - 1);
}
_exp[size - 1] = _exp[0];
for (int i = 0; i < size - 1; i++) {
_log[_exp[i]] = i;
}
}