fn compute_left_covering_prefix(
    start: usize,
    max_error_exp: usize,
    min_support: usize,
    nb_digits: usize,
) -> Vec<usize> {
    let left_bound = start - min_support;
    let left_bound = decompose_value(left_bound, 2, nb_digits);
    let (prefix, suffix) = left_bound.split_at(nb_digits - max_error_exp);

    prefix
        .iter()
        .chain(suffix.iter().take_while(|x| **x == 1))
        .cloned()
        .collect()
}
/// Take the largest prefix of the smallest interval that contains [max_error; end + min_support]
Take the largest prefix of the smallest interval that contains [max_error; end + min_support]
Take the largest prefix of the smallest interval that contains [ max_error ; end + min_support ]
fn compute_left_covering_prefix(
    start: usize,
    max_error_exp: usize,
    min_support: usize,
    nb_digits: usize,
) -> Vec<usize> {
    let left_bound = start - min_support;
    let left_bound = decompose_value(left_bound, 2, nb_digits);
    let (prefix, suffix) = left_bound.split_at(nb_digits - max_error_exp);
    prefix
        .iter()
        .chain(suffix.iter().take_while(|x| **x == 1))
        .cloned()
        .collect()
}
fn compute_left_covering_prefix ( start : usize , max_error_exp : usize , min_support : usize , nb_digits : usize , ) -> Vec < usize > { let left_bound = start - min_support ; let left_bound = decompose_value ( left_bound , 2 , nb_digits ) ; let ( prefix , suffix ) = left_bound . split_at ( nb_digits - max_error_exp ) ; prefix . iter ( ) . chain ( suffix . iter ( ) . take_while ( | x | * * x == 1 ) ) . cloned ( ) . collect ( ) }
Take the largest prefix of the smallest interval that contains [max_error; end + min_support]
Take the largest prefix of the smallest interval that contains [ max_error ; end + min_support ]
start
usize
max_error_exp
usize
min_support
usize
nb_digits
usize