pub fn look_up<'a>(
        &'a self,
        paths: &[(usize, Vec<usize>)],
    ) -> Option<(&'a T, Vec<IndexedPath>)> {
        if paths.len() < self.nb_required {
            return None;
        }

        let store = &self.store;

        let combination_iter = CombinationIterator::new(paths.len(), self.nb_required);

        let nb_roots = self.nb_tries - self.nb_required + 1;

        for selector in combination_iter {
            let first_index = paths[selector[0]].0;
            if first_index >= nb_roots {
                continue;
            }

            let res = self.look_up_internal(
                &store[first_index],
                &paths
                    .iter()
                    .enumerate()
                    .filter_map(|(i, x)| {
                        if selector.contains(&i) {
                            return Some(x);
                        }
                        None
                    })
                    .collect::<Vec<_>>(),
                0,
            );
            if let Some(mut l_res) = res {
                l_res.path.reverse();
                return Some((l_res.value, l_res.path.clone()));
            }
        }

        None
    }
/// Lookup in the trie for a value that matches with `paths`.
Lookup in the trie for a value that matches with `paths`.
Lookup in the trie for a value that matches with ` paths ` .
pub fn look_up<'a>(
        &'a self,
        paths: &[(usize, Vec<usize>)],
    ) -> Option<(&'a T, Vec<IndexedPath>)> {
        if paths.len() < self.nb_required {
            return None;
        }
        let store = &self.store;
        let combination_iter = CombinationIterator::new(paths.len(), self.nb_required);
        let nb_roots = self.nb_tries - self.nb_required + 1;
        for selector in combination_iter {
            let first_index = paths[selector[0]].0;
            if first_index >= nb_roots {
                continue;
            }
            let res = self.look_up_internal(
                &store[first_index],
                &paths
                    .iter()
                    .enumerate()
                    .filter_map(|(i, x)| {
                        if selector.contains(&i) {
                            return Some(x);
                        }
                        None
                    })
                    .collect::<Vec<_>>(),
                0,
            );
            if let Some(mut l_res) = res {
                l_res.path.reverse();
                return Some((l_res.value, l_res.path.clone()));
            }
        }
        None
    }
pub fn look_up < ' a > ( & ' a self , paths : & [ ( usize , Vec < usize > ) ] , ) -> Option < ( & ' a T , Vec < IndexedPath > ) > { if paths . len ( ) < self . nb_required { return None ; } let store = & self . store ; let combination_iter = CombinationIterator :: new ( paths . len ( ) , self . nb_required ) ; let nb_roots = self . nb_tries - self . nb_required + 1 ; for selector in combination_iter { let first_index = paths [ selector [ 0 ] ] . 0 ; if first_index >= nb_roots { continue ; } let res = self . look_up_internal ( & store [ first_index ] , & paths . iter ( ) . enumerate ( ) . filter_map ( | ( i , x ) | { if selector . contains ( & i ) { return Some ( x ) ; } None } ) . collect :: < Vec < _ > > ( ) , 0 , ) ; if let Some ( mut l_res ) = res { l_res . path . reverse ( ) ; return Some ( ( l_res . value , l_res . path . clone ( ) ) ) ; } } None }
Lookup in the trie for a value that matches with `paths`.
Lookup in the trie for a value that matches with ` paths ` .
&'a self
paths
&[(usize, Vec<usize>)]