/// Populate the edges of the traceback matrix
Populate the edges of the traceback matrix
Populate the edges of the traceback matrix
fn initialize_scores(&mut self, gap_open: i32) {
        for (i, row) in self
            .matrix
            .iter_mut()
            .enumerate()
            .take(self.rows + 1)
            .skip(1)
        {
            // TODO: these should be -1 * distance from head node
            row[0] = TracebackCell {
                score: (i as i32) * gap_open, // gap_open penalty
                op: AlignmentOperation::Del(None),
            };
        }
        for j in 1..=self.cols {
            self.matrix[0][j] = TracebackCell {
                score: (j as i32) * gap_open,
                op: AlignmentOperation::Ins(None),
            };
        }
    }
fn initialize_scores ( & mut self , gap_open : i32 ) { for ( i , row ) in self . matrix . iter_mut ( ) . enumerate ( ) . take ( self . rows + 1 ) . skip ( 1 ) { // TODO: these should be -1 * distance from head node row [ 0 ] = TracebackCell { score : ( i as i32 ) * gap_open , // gap_open penalty op : AlignmentOperation :: Del ( None ) , } ; } for j in 1 ..= self . cols { self . matrix [ 0 ] [ j ] = TracebackCell { score : ( j as i32 ) * gap_open , op : AlignmentOperation :: Ins ( None ) , } ; } }
Populate the edges of the traceback matrix
Populate the edges of the traceback matrix
&mut self
gap_open
i32