INNER CODE UNIT · Rust
increment
google/best · src/stats.rs:82
pub fn increment(&mut self, q_score: usize, is_match: bool) {
if is_match {
self.stats[q_score].0 += 1;
} else {
self.stats[q_score].1 += 1;
}
}
pub fn empirical_qv(&self) -> Vec<(usize, f64)> {
self.stats
.iter()
.enumerate()
.filter_map(|(i, &(matches, mismatches))| {
if matches == 0 && mismatches == 0 {
None
} else {
Some((
i,