pub fn euclidean(
syndromes: &Polynomial,
t: u8,
) -> Result<(Polynomial, Polynomial), EuclideanError>Expand description
Extended Euclidean algorithm for Reed-Solomon decoding.
Given a syndrome polynomial and the error-correction capability t,
computes the error locator polynomial (sigma) and the error evaluator
polynomial (omega). The syndrome polynomial has 2 * t coefficients.
§Arguments
syndromes- Syndrome polynomialt- Error-correction capability, the number of correctable errors; must satisfy2 * t <= 254so thatx^(2t)is representable
§Returns
A tuple (sigma, omega) where:
sigmais the error locator polynomialomegais the error evaluator polynomial
§Errors
EuclideanError::CapabilityTooHighis returned if2 * texceedsPolynomial::MAX_DEGREE.- An error is returned if division by zero occurs (indicates invalid input), or if an intermediate product would exceed the maximum polynomial degree (not expected to occur).