You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: trend_computer.rs
    path of file: ./repos/rhit/src
    
    the code of the file until where you have to start completion: use {
    crate::*,
};

const MAX_HISTO_LEN: usize = 20;

pub struct TrendComputer {
    histo_offset: usize, // number of old days skipped
    histo_len: usize, // = ref_len + tail_len
    pub ref_len: usize,
    pub tail_len: usize,
    normalization_f
    
    pub fn compute_trend(&self, lines: &[&LogLine]) -> Trend {
        let sum_per_day = self.compute_histo_line(lines);
        let (ref_count, tail_count) = self.compute_ref_tail_counts(&sum_per_day);
        let value = if ref_count+tail_count == 0 {
            0i32
        } else {
            let tc = (tail_count as f32) * self.normalization_factor;
            let rc = ref_count as f32;
            (1000f32 * (tc - rc) / (rc + tc)) as i32
        };
        Trend { sum_per_day, value, ref_count, tail_count }
    }