pub fn advance(&mut self, pos: i32) {
    // Avoid full run in advance() on every character.
    // Only run 1 character when requested by setting `dirty = true` in `update()`.
    if !self.dirty {
      return;
    }

    if self.frame == 0 && self.begin != POSITION_INVALID {
      // We are not in shift and `begin` was set previously. This is the end of the shift range. Remember the range.
      debug_assert!(self.begin >= 0);
      debug_assert!(self.begin <= self.end);
      self.frame_shifts.push(Range {
        begin: self.begin as usize,
        end: self.end as usize,
      });
      self.reset();
    }

    if self.frame != 0 && self.begin == POSITION_INVALID {
      // We are in the frame shift. This *might* be the the beginning of a shifted range. Note that it might also not
      // be, because there might be more non-shifting characters ahead.
      self.begin = pos;
    }

    self.dirty = false;
  }
/// Call this for every non-shifting character (not an indel) */
Call this for every non-shifting character (not an indel)
Call this for every non - shifting character ( not an indel )
pub fn advance(&mut self, pos: i32) {
    // Avoid full run in advance() on every character.
    // Only run 1 character when requested by setting `dirty = true` in `update()`.
    if !self.dirty {
      return;
    }
    if self.frame == 0 && self.begin != POSITION_INVALID {
      // We are not in shift and `begin` was set previously. This is the end of the shift range. Remember the range.
      debug_assert!(self.begin >= 0);
      debug_assert!(self.begin <= self.end);
      self.frame_shifts.push(Range {
        begin: self.begin as usize,
        end: self.end as usize,
      });
      self.reset();
    }
    if self.frame != 0 && self.begin == POSITION_INVALID {
      // We are in the frame shift. This *might* be the the beginning of a shifted range. Note that it might also not
      // be, because there might be more non-shifting characters ahead.
      self.begin = pos;
    }
    self.dirty = false;
  }
pub fn advance ( & mut self , pos : i32 ) { // Avoid full run in advance() on every character. // Only run 1 character when requested by setting `dirty = true` in `update()`. if ! self . dirty { return ; } if self . frame == 0 && self . begin != POSITION_INVALID { // We are not in shift and `begin` was set previously. This is the end of the shift range. Remember the range. debug_assert ! ( self begin 0 ) ; debug_assert ! ( self begin self end ) ; self . frame_shifts . push ( Range { begin : self . begin as usize , end : self . end as usize , } ) ; self . reset ( ) ; } if self . frame != 0 && self . begin == POSITION_INVALID { // We are in the frame shift. This *might* be the the beginning of a shifted range. Note that it might also not // be, because there might be more non-shifting characters ahead. self . begin = pos ; } self . dirty = false ; }
Call this for every non-shifting character (not an indel)
Call this for every non - shifting character ( not an indel )
&mut self
pos
i32
&mut self
pos
i32