GenericGF class

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

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

Constructors

GenericGF(int _primitive, int _size, int _generatorBase)
Create a representation of GF(size) using the given primitive polynomial.

Properties

generatorBase int
no setter
hashCode int
The hash code for this object.
no setterinherited
one GenericGFPoly
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
size int
no setter
zero GenericGFPoly
no setter

Methods

buildMonomial(int degree, int coefficient) GenericGFPoly
@return the monomial representing coefficient * x^degree
exp(int a) int
@return 2 to the power of a in GF(size)
inverse(int a) int
@return multiplicative inverse of a
log(int a) int
@return base 2 log of a in GF(size)
multiply(int a, int b) int
@return product of a and b in GF(size)
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

Static Properties

aztecData10 GenericGF
final
aztecData12 GenericGF
final
aztecData6 GenericGF
final
aztecData8 GenericGF
final
aztecParam GenericGF
final
dataMatrixField256 GenericGF
final
maxicodeField64 GenericGF
final
qrCodeField256 GenericGF
final

Static Methods

addOrSubtract(int a, int b) int
Implements both addition and subtraction -- they are the same in GF(size).