Options
All
  • Public
  • Public/Protected
  • All
Menu

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 {@code int} for convenience and speed (but at the cost of memory).

author

Sean Owen

author

David Olivier

Hierarchy

Index

Constructors

constructor

  • new GenericGF(primitive: number, size: number, generatorBase: number): GenericGF
  • Create a representation of GF(size) using the given primitive polynomial.

    Parameters

    • primitive: number

      irreducible polynomial whose coefficients are represented by the bits of an int, where the least-significant bit represents the constant coefficient

    • size: number

      the size of the field

    • generatorBase: number

    Returns GenericGF

Properties

Protected expTable

expTable: Int32Array

Private generatorBase

generatorBase: number

Protected logTable

logTable: Int32Array

Private one

Private primitive

primitive: number

irreducible polynomial whose coefficients are represented by the bits of an int, where the least-significant bit represents the constant coefficient

Private size

size: number

the size of the field

Private zero

Static AZTEC_DATA_10

AZTEC_DATA_10: GenericGF = new GenericGF(0x409, 1024, 1)

Static AZTEC_DATA_12

AZTEC_DATA_12: GenericGF = new GenericGF(0x1069, 4096, 1)

Static AZTEC_DATA_6

AZTEC_DATA_6: GenericGF = new GenericGF(0x43, 64, 1)

Static AZTEC_DATA_8

AZTEC_DATA_8: GenericGF = GenericGF.DATA_MATRIX_FIELD_256

Static AZTEC_PARAM

AZTEC_PARAM: GenericGF = new GenericGF(0x13, 16, 1)

Static DATA_MATRIX_FIELD_256

DATA_MATRIX_FIELD_256: GenericGF = new GenericGF(0x012d, 256, 1)

Static MAXICODE_FIELD_64

MAXICODE_FIELD_64: GenericGF = GenericGF.AZTEC_DATA_6

Static QR_CODE_FIELD_256

QR_CODE_FIELD_256: GenericGF = new GenericGF(0x011d, 256, 0)

Methods

buildMonomial

  • buildMonomial(degree: number, coefficient: number): GenericGFPoly

equals

  • equals(o: Object): boolean

exp

  • exp(a: number): number

getGeneratorBase

  • getGeneratorBase(): number

getOne

getSize

  • getSize(): number

getZero

inverse

  • inverse(a: number): number

log

  • log(a: number): number

multiply

  • multiply(a: number, b: number): number

toString

  • toString(): string

Static addOrSubtract

  • addOrSubtract(a: number, b: number): number

Generated using TypeDoc