Class ReedSolomonCodes_U16


public class ReedSolomonCodes_U16 extends Object
TODO Summarize

Code and code comments based on the tutorial at [1].

[1] Reed-Solomon Codes for Coders Viewed on September 28, 2017

  • Constructor Details

    • ReedSolomonCodes_U16

      public ReedSolomonCodes_U16(int numBits, int primitive, int generatorBase)
      numBits - Number of bits in each word
      primitive - Primitive polynomial
      generatorBase - Base for generator polynomial. 0 or 1
  • Method Details

    • computeECC

      public void computeECC(DogArray_I16 input, DogArray_I16 output)
      Given the input message compute the error correction code for it
      input - Input message. Modified internally then returned to its initial state
      output - error correction code
    • correct

      public boolean correct(DogArray_I16 input, DogArray_I16 ecc)
      Decodes the message and performs any necessary error correction
      input - (Input) Corrupted Message (Output) corrected message
      ecc - (Input) error correction code for the message
      true if it was successful or false if it failed
    • findErrorLocations_BruteForce

      public boolean findErrorLocations_BruteForce(DogArray_I16 errorLocator, int messageLength, DogArray_I32 locations)
      Creates a list of shorts that have errors in them
      errorLocator - (Input) Error locator polynomial. Coefficients from small to large.
      messageLength - (Input) Length of the message + ecc.
      locations - (Output) locations of shorts in message with errors.
    • generator

      public void generator(int degree)
      Creates the generator function with the specified polynomial degree. The generator function is composed of factors of (x-a_n) where a_n is a power of 2.
      if generatorFamily = 0 then:
      g4(x) = (x - α0) (x - α1) (x - α2) (x - α3) = 01 x4 + 0f x3 + 36 x2 + 78 x + 40
      degree - Number of words in ECC. Larger values mean more error correction
    • getTotalErrors

      public int getTotalErrors()
      Number of bit errors