GenericGFPoly class

Represents a polynomial whose coefficients are elements of a GF. Instances of this class are immutable.

Much credit is due to William Rucklidge since portions of this code are an indirect port of his C++ Reed-Solomon implementation.

@author Sean Owen

Constructors

GenericGFPoly(GenericGF _field, List<int> coefficients)
@param field the GenericGF instance representing the field to use to perform computations @param coefficients coefficients as ints representing elements of GF(size), arranged from most significant (highest-power term) coefficient to least significant @throws IllegalArgumentException if argument is null or empty, or if leading coefficient is 0 and this is not a constant polynomial (that is, it is not the monomial "0")

Properties

coefficients → List<int>
no setter
degree → int
@return degree of this polynomial
no setter
hashCode → int
The hash code for this object.
no setterinherited
isZero → bool
@return true iff this polynomial is the monomial "0"
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

addOrSubtract(GenericGFPoly other) → GenericGFPoly
divide(GenericGFPoly other) → List<GenericGFPoly>
evaluateAt(int a) → int
@return evaluation of this polynomial at a given point
getCoefficient(int degree) → int
@return coefficient of x^degree term in this polynomial
multiply(GenericGFPoly other) → GenericGFPoly
multiplyByMonomial(int degree, int coefficient) → GenericGFPoly
multiplyInt(int scalar) → GenericGFPoly
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited