fn chien_search(base_poly: Polynomial) -> Vec<u8> {
    let mut error_positions = vec![];
    let mut i = 1u8;

    while error_positions.len() < base_poly.degree() {
        let eval = base_poly.evaluate(Fp(i));
        if eval == Fp::zero() {
            error_positions.push(i);
        };
        i += 1;
    }

    error_positions
}
/// Evaluates the localizator poly on points 0... until it finds
/// as many 0's as the degree of the localizator error.
///
/// This is indeed because the localizator error degree is already
/// telling us how many errors does the recieved message has. So we know
/// that we need to be evaluating the poly until two evaluations give 0.
/// The error_positions are returned starting by the most significant
/// monomial of the polynomial.
Evaluates the localizator poly on points 0... until it finds
as many 0's as the degree of the localizator error.

This is indeed because the localizator error degree is already
telling us how many errors does the recieved message has. So we know
that we need to be evaluating the poly until two evaluations give 0.
The error_positions are returned starting by the most significant
monomial of the polynomial.
Evaluates the localizator poly on points 0 ... until it finds as many 0 ' s as the degree of the localizator error . This is indeed because the localizator error degree is already telling us how many errors does the recieved message has . So we know that we need to be evaluating the poly until two evaluations give 0 . The error_positions are returned starting by the most significant monomial of the polynomial .
fn chien_search(base_poly: Polynomial) -> Vec<u8> {
    let mut error_positions = vec![];
    let mut i = 1u8;
    while error_positions.len() < base_poly.degree() {
        let eval = base_poly.evaluate(Fp(i));
        if eval == Fp::zero() {
            error_positions.push(i);
        };
        i += 1;
    }
    error_positions
}
fn chien_search ( base_poly : Polynomial ) -> Vec < u8 > { let mut error_positions = vec ! [ ] ; let mut i = 1u8 ; while error_positions . len ( ) < base_poly . degree ( ) { let eval = base_poly . evaluate ( Fp ( i ) ) ; if eval == Fp :: zero ( ) { error_positions . push ( i ) ; } ; i += 1 ; } error_positions }
Evaluates the localizator poly on points 0... until it finds
as many 0's as the degree of the localizator error.
Evaluates the localizator poly on points 0 ... until it finds as many 0 ' s as the degree of the localizator error .
base_poly
Polynomial
base_poly
Polynomial