\Zxing\Common\ReedsolomonGenericGFPoly

<p>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.

Summary

Methods
Properties
Constants
__construct()
getCoefficients()
evaluateAt()
getCoefficient()
multiply()
multiply_()
isZero()
multiplyByMonomial()
divide()
getDegree()
addOrSubtract()
toString()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$field
$coefficients
N/A

Properties

$field

$field

$coefficients

$coefficients

Methods

__construct()

__construct(mixed  $field, mixed  $coefficients) : mixed

Parameters

mixed $field
mixed $coefficients

Throws

\Zxing\Common\Reedsolomon\InvalidArgumentException

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")

Returns

mixed —

getCoefficients()

getCoefficients() : mixed

Returns

mixed —

evaluateAt()

evaluateAt(mixed  $a) : \Zxing\Common\Reedsolomon\evaluation

Parameters

mixed $a

Returns

\Zxing\Common\Reedsolomon\evaluation —

of this polynomial at a given point

getCoefficient()

getCoefficient(mixed  $degree) : \Zxing\Common\Reedsolomon\coefficient

Parameters

mixed $degree

Returns

\Zxing\Common\Reedsolomon\coefficient —

of x^degree term in this polynomial

multiply()

multiply(mixed  $other) : mixed

Parameters

mixed $other

Returns

mixed —

multiply_()

multiply_(mixed  $scalar) : mixed

Parameters

mixed $scalar

Returns

mixed —

isZero()

isZero() : true

Returns

true —

iff this polynomial is the monomial "0"

multiplyByMonomial()

multiplyByMonomial(mixed  $degree, mixed  $coefficient) : mixed

Parameters

mixed $degree
mixed $coefficient

Returns

mixed —

divide()

divide(mixed  $other) : mixed

Parameters

mixed $other

Returns

mixed —

getDegree()

getDegree() : \Zxing\Common\Reedsolomon\degree

Returns

\Zxing\Common\Reedsolomon\degree —

of this polynomial

addOrSubtract()

addOrSubtract(mixed  $other) : mixed

Parameters

mixed $other

Returns

mixed —

toString()

toString() : mixed

Returns

mixed —