buildMonomial method

GenericGFPoly buildMonomial(
  1. int degree,
  2. int coefficient
)

@return the monomial representing coefficient * x^degree

Implementation

GenericGFPoly buildMonomial(int degree, int coefficient) {
  if (degree < 0) {
    throw ArgumentError('IllegalArgument');
  }
  if (coefficient == 0) {
    return _zero;
  }
  final coefficients = Int32List(degree + 1);
  coefficients[0] = coefficient;
  return GenericGFPoly(this, coefficients);
}