for j in 1..col { the_mat.set(0, j, gap_penalty * j as f32) ; } let mut score: f32 = 0.0; for i in 1..lin { the_mat.set(i, 0, gap_penalty * i as f32) ; for j in 1..col { if seq1[j-1] == seq2[i-1] { score = match_bonus} else { score = 0.0} the_mat.set(i, j, max3(the_mat.get(i-1,j-1).unwrap() + score, the_mat.get(i-1,j).unwrap() + gap_penalty, the_mat.get(i,j-1).unwrap() + gap_penalty)); } }