pub fn variance(&self) -> Vec<f32> {
        if self.count > 0 {
            let mut var = Vec::with_capacity(self.sum_power1.len());
            for (s1, s2) in self.sum_power1.iter().zip(&self.sum_power2) {
                let moment1 = s1 / (self.count as f32);
                let moment2 = s2 / (self.count as f32);
                var.push(moment2 - moment1 * moment1)
            }
            var
        } else {
            vec![0.0; self.sum_power1.len()]
        }
    }
/// Variance of the vector data that produced this summary
Variance of the vector data that produced this summary
Variance of the vector data that produced this summary
pub fn variance(&self) -> Vec<f32> {
        if self.count > 0 {
            let mut var = Vec::with_capacity(self.sum_power1.len());
            for (s1, s2) in self.sum_power1.iter().zip(&self.sum_power2) {
                let moment1 = s1 / (self.count as f32);
                let moment2 = s2 / (self.count as f32);
                var.push(moment2 - moment1 * moment1)
            }
            var
        } else {
            vec![0.0; self.sum_power1.len()]
        }
    }
pub fn variance ( & self ) -> Vec < f32 > { if self . count > 0 { let mut var = Vec :: with_capacity ( self . sum_power1 . len ( ) ) ; for ( s1 , s2 ) in self . sum_power1 . iter ( ) . zip ( & self . sum_power2 ) { let moment1 = s1 / ( self . count as f32 ) ; let moment2 = s2 / ( self . count as f32 ) ; var . push ( moment2 - moment1 * moment1 ) } var } else { vec ! [ 0.0 self sum_power1 len ( ) ] } }
Variance of the vector data that produced this summary
Variance of the vector data that produced this summary
&self
&self