public class ReidSolomonCodes
extends java.lang.Object
Code and code comments based on the tutorial at [1].
[1] Reed-Solomon Codes for Coders Viewed on September 28, 2017
| Constructor and Description |
|---|
ReidSolomonCodes(int numBits,
int primitive) |
| Modifier and Type | Method and Description |
|---|---|
void |
computeECC(org.ddogleg.struct.GrowQueue_I8 input,
org.ddogleg.struct.GrowQueue_I8 output)
Given the input message compute the error correction code for it
|
boolean |
correct(org.ddogleg.struct.GrowQueue_I8 input,
org.ddogleg.struct.GrowQueue_I8 ecc)
Decodes the message and performs any necessary error correction
|
boolean |
findErrorLocations_BruteForce(org.ddogleg.struct.GrowQueue_I8 errorLocator,
int messageLength,
org.ddogleg.struct.GrowQueue_I32 locations)
Creates a list of bytes that have errors in them
|
void |
setDegree(int degree) |
public void setDegree(int degree)
public void computeECC(org.ddogleg.struct.GrowQueue_I8 input,
org.ddogleg.struct.GrowQueue_I8 output)
input - Input message. Modified internally then returned to its initial stateoutput - error correction codepublic boolean correct(org.ddogleg.struct.GrowQueue_I8 input,
org.ddogleg.struct.GrowQueue_I8 ecc)
input - (Input) Corrupted Message (Output) corrected messageecc - (Input) error correction code for the messagepublic boolean findErrorLocations_BruteForce(org.ddogleg.struct.GrowQueue_I8 errorLocator,
int messageLength,
org.ddogleg.struct.GrowQueue_I32 locations)
errorLocator - (Input) Error locator polynomial. Coefficients from small to large.messageLength - (Input) Length of the message + ecc.locations - (Output) locations of bytes in message with errors.