INNER CODE UNIT · Rust

assign_add

google/best · src/stats.rs:75

    pub fn assign_add(&mut self, o: &Self) {
        self.stats.iter_mut().zip(&o.stats).for_each(|(q, o)| {
            q.0 += o.0;
            q.1 += o.1;
        });
    }

    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()

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…