GFPoly.monominalPoly constructor

GFPoly.monominalPoly(
  1. GaloisField field,
  2. int degree,
  3. int coeff
)

Implementation

factory GFPoly.monominalPoly(GaloisField field, int degree, int coeff) {
  if (coeff == 0) {
    return field.zero();
  }
  final result = List<int>.filled(degree + 1, 0);
  result[0] = coeff;
  return GFPoly(field, result);
}