GenericGF (ZXing 3.5.2 API)
Description: declaration: package: com.google.zxing.common.reedsolomon, class: GenericGF

Package com.google.zxing.common.reedsolomon

# Class GenericGF

java.lang.Object
com.google.zxing.common.reedsolomon.GenericGF

public final class GenericGF extends Object

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

The size of the GF is assumed to be a power of two.

Author:
  Sean Owen, David Olivier

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final GenericGF`
  `AZTEC_DATA_10`
  `static final GenericGF`
  `AZTEC_DATA_12`
  `static final GenericGF`
  `AZTEC_DATA_6`
  `static final GenericGF`
  `AZTEC_DATA_8`
  `static final GenericGF`
  `AZTEC_PARAM`
  `static final GenericGF`
  `DATA_MATRIX_FIELD_256`
  `static final GenericGF`
  `MAXICODE_FIELD_64`
  `static final GenericGF`
  `QR_CODE_FIELD_256`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `GenericGF(int primitive, int size, int b)`
  Create a representation of GF(size) using the given primitive polynomial.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `getGeneratorBase()`
  `int`
  `getSize()`
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### AZTEC_DATA_12

    public static final GenericGF AZTEC_DATA_12

  - ### AZTEC_DATA_10

    public static final GenericGF AZTEC_DATA_10

  - ### AZTEC_DATA_6

    public static final GenericGF AZTEC_DATA_6

  - ### AZTEC_PARAM

    public static final GenericGF AZTEC_PARAM

  - ### QR_CODE_FIELD_256

    public static final GenericGF QR_CODE_FIELD_256

  - ### DATA_MATRIX_FIELD_256

    public static final GenericGF DATA_MATRIX_FIELD_256

  - ### AZTEC_DATA_8

    public static final GenericGF AZTEC_DATA_8

  - ### MAXICODE_FIELD_64

    public static final GenericGF MAXICODE_FIELD_64

- ## Constructor Details

  - ### GenericGF

    public GenericGF(int primitive, int size, int b)
    Create a representation of GF(size) using the given primitive polynomial.
    Parameters:
      `primitive` - irreducible polynomial whose coefficients are represented by the bits of an int, where the least-significant bit represents the constant coefficient
      `size` - the size of the field
      `b` - the factor b in the generator polynomial can be 0- or 1-based (g(x) = (x+a^b)(x+a^(b+1))...(x+a^(b+2t-1))). In most cases it should be 1, but for QR code it is 0.

- ## Method Details

  - ### getSize

    public int getSize()

  - ### getGeneratorBase

    public int getGeneratorBase()

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`