\Zxing\Common\ReedsolomonGenericGF

<p>This class contains utility methods for performing mathematical operations over the Galois Fields. Operations use a given primitive polynomial in calculations.</p>

Throughout this package, elements of the GF are represented as an {@code int} for convenience and speed (but at the cost of memory).

Summary

Methods
Properties
Constants
__construct()
Init()
addOrSubtract()
getZero()
getOne()
buildMonomial()
exp()
log()
inverse()
multiply()
getSize()
getGeneratorBase()
toString()
$AZTEC_DATA_12
$AZTEC_DATA_10
$AZTEC_DATA_6
$AZTEC_PARAM
$QR_CODE_FIELD_256
$DATA_MATRIX_FIELD_256
$AZTEC_DATA_8
$MAXICODE_FIELD_64
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$expTable
$logTable
$zero
$one
$size
$primitive
$generatorBase
N/A

Properties

$AZTEC_DATA_12

$AZTEC_DATA_12

$AZTEC_DATA_10

$AZTEC_DATA_10

$AZTEC_DATA_6

$AZTEC_DATA_6

$AZTEC_PARAM

$AZTEC_PARAM

$QR_CODE_FIELD_256

$QR_CODE_FIELD_256

$DATA_MATRIX_FIELD_256

$DATA_MATRIX_FIELD_256

$AZTEC_DATA_8

$AZTEC_DATA_8

$MAXICODE_FIELD_64

$MAXICODE_FIELD_64

$expTable

$expTable

$logTable

$logTable

$zero

$zero

$one

$one

$size

$size

$primitive

$primitive

$generatorBase

$generatorBase

Methods

__construct()

__construct(mixed  $primitive, mixed  $size, mixed  $b) : mixed

Create a representation of GF(size) using the given primitive polynomial.

Parameters

mixed $primitive
mixed $size
mixed $b

Returns

mixed —

Init()

Init() : mixed

Returns

mixed —

addOrSubtract()

addOrSubtract(mixed  $a, mixed  $b) : mixed

Implements both addition and subtraction -- they are the same in GF(size).

Parameters

mixed $a
mixed $b

Returns

mixed —

getZero()

getZero() : mixed

Returns

mixed —

getOne()

getOne() : mixed

Returns

mixed —

buildMonomial()

buildMonomial(mixed  $degree, mixed  $coefficient) : \Zxing\Common\Reedsolomon\the

Parameters

mixed $degree
mixed $coefficient

Returns

\Zxing\Common\Reedsolomon\the —

monomial representing coefficient * x^degree

exp()

exp(mixed  $a) : \Zxing\Common\Reedsolomon\2

Parameters

mixed $a

Returns

\Zxing\Common\Reedsolomon\2 —

to the power of a in GF(size)

log()

log(mixed  $a) : \Zxing\Common\Reedsolomon\base

Parameters

mixed $a

Returns

\Zxing\Common\Reedsolomon\base —

2 log of a in GF(size)

inverse()

inverse(mixed  $a) : \Zxing\Common\Reedsolomon\multiplicative

Parameters

mixed $a

Returns

\Zxing\Common\Reedsolomon\multiplicative —

inverse of a

multiply()

multiply(mixed  $a, mixed  $b) : int

Parameters

mixed $a
mixed $b

Returns

int —

product of a and b in GF(size)

getSize()

getSize() : mixed

Returns

mixed —

getGeneratorBase()

getGeneratorBase() : mixed

Returns

mixed —

toString()

toString() : mixed

Returns

mixed —