monomial static method

UGfPoly monomial(
  1. UGaloisField field,
  2. int degree,
  3. int coefficient
)

Implementation

static UGfPoly monomial(UGaloisField field, int degree, int coefficient) {
  if (degree < 0) throw const UCodeDecodeException("Negative monomial degree");
  if (coefficient == 0) return UGfPoly(field, Int32List.fromList(<int>[0]));
  final Int32List coefficients = Int32List(degree + 1);
  coefficients[0] = coefficient;
  return UGfPoly(field, coefficients);
}