fn compute_interval_from_prefix(
    prefix: &[usize],
    num_digits: usize,
    base: usize,
) -> (usize, usize) {
    let suffix_len = num_digits - prefix.len();
    let start = compose_value(
        &prefix
            .iter()
            .cloned()
            .chain((0..suffix_len).map(|_| 0))
            .collect::<Vec<_>>(),
        base,
    );
    let end = compose_value(
        &prefix
            .iter()
            .cloned()
            .chain((0..suffix_len).map(|_| base - 1))
            .collect::<Vec<_>>(),
        base,
    );
    (start, end)
}
/// Returns the interval represented by the given prefix in the given base with
/// the given number of digits.
Returns the interval represented by the given prefix in the given base with
the given number of digits.
Returns the interval represented by the given prefix in the given base with the given number of digits .
fn compute_interval_from_prefix(
    prefix: &[usize],
    num_digits: usize,
    base: usize,
) -> (usize, usize) {
    let suffix_len = num_digits - prefix.len();
    let start = compose_value(
        &prefix
            .iter()
            .cloned()
            .chain((0..suffix_len).map(|_| 0))
            .collect::<Vec<_>>(),
        base,
    );
    let end = compose_value(
        &prefix
            .iter()
            .cloned()
            .chain((0..suffix_len).map(|_| base - 1))
            .collect::<Vec<_>>(),
        base,
    );
    (start, end)
}
fn compute_interval_from_prefix ( prefix : & [ usize ] , num_digits : usize , base : usize , ) -> ( usize , usize ) { let suffix_len = num_digits - prefix . len ( ) ; let start = compose_value ( & prefix . iter ( ) . cloned ( ) . chain ( ( 0 .. suffix_len ) . map ( | _ | 0 ) ) . collect :: < Vec < _ > > ( ) , base , ) ; let end = compose_value ( & prefix . iter ( ) . cloned ( ) . chain ( ( 0 .. suffix_len ) . map ( | _ | base - 1 ) ) . collect :: < Vec < _ > > ( ) , base , ) ; ( start , end ) }
Returns the interval represented by the given prefix in the given base with
the given number of digits.
Returns the interval represented by the given prefix in the given base with the given number of digits .
prefix
&[usize]
num_digits
usize
base
usize