pub fn sequence_of_path<'a, I: 'a + Iterator<Item = &'a (usize, Dir)>>(
        &self,
        path: I,
    ) -> DnaString {
        let mut seq = DnaString::new();

        for (idx, &(node_id, dir)) in path.enumerate() {
            let start = if idx == 0 { 0 } else { K::k() - 1 };

            let node_seq = match dir {
                Dir::Left => self.get_node(node_id).sequence(),
                Dir::Right => self.get_node(node_id).sequence().rc(),
            };

            for p in start..node_seq.len() {
                seq.push(node_seq.get(p))
            }
        }

        seq
    }
/// Get the sequence of a path through the graph. The path is given as a sequence of node_id integers
Get the sequence of a path through the graph. The path is given as a sequence of node_id integers
Get the sequence of a path through the graph . The path is given as a sequence of node_id integers
pub fn sequence_of_path<'a, I: 'a + Iterator<Item = &'a (usize, Dir)>>(
        &self,
        path: I,
    ) -> DnaString {
        let mut seq = DnaString::new();
        for (idx, &(node_id, dir)) in path.enumerate() {
            let start = if idx == 0 { 0 } else { K::k() - 1 };
            let node_seq = match dir {
                Dir::Left => self.get_node(node_id).sequence(),
                Dir::Right => self.get_node(node_id).sequence().rc(),
            };
            for p in start..node_seq.len() {
                seq.push(node_seq.get(p))
            }
        }
        seq
    }
pub fn sequence_of_path < ' a , I : ' a + Iterator < Item = & ' a ( usize , Dir ) > > ( & self , path : I , ) -> DnaString { let mut seq = DnaString :: new ( ) ; for ( idx , & ( node_id , dir ) ) in path . enumerate ( ) { let start = if idx == 0 { 0 } else { K :: k ( ) - 1 } ; let node_seq = match dir { Dir :: Left => self . get_node ( node_id ) . sequence ( ) , Dir :: Right => self . get_node ( node_id ) . sequence ( ) . rc ( ) , } ; for p in start .. node_seq . len ( ) { seq . push ( node_seq . get ( p ) ) } } seq }
Get the sequence of a path through the graph.
Get the sequence of a path through the graph .
&self
path
I
&self
path
I