pub fn new(probability: f64, tolerance: f64, config: C::Config) -> Self {
		let width = Self::optimal_width(tolerance);
		let k_num = Self::optimal_k_num(probability);
		let counters: Vec<Vec<C>> = (0..k_num)
			.map(|_| (0..width).map(|_| C::new(&config)).collect())
			.collect();
		let offsets = vec![0; k_num];
		Self {
			counters,
			offsets,
			mask: Self::mask(width),
			k_num,
			config,
			marker: PhantomData,
		}
	}
/// Create an empty `CountMinSketch` data structure with the specified error tolerance.
Create an empty `CountMinSketch` data structure with the specified error tolerance.
Create an empty ` CountMinSketch ` data structure with the specified error tolerance .
pub fn new(probability: f64, tolerance: f64, config: C::Config) -> Self {
		let width = Self::optimal_width(tolerance);
		let k_num = Self::optimal_k_num(probability);
		let counters: Vec<Vec<C>> = (0..k_num)
			.map(|_| (0..width).map(|_| C::new(&config)).collect())
			.collect();
		let offsets = vec![0; k_num];
		Self {
			counters,
			offsets,
			mask: Self::mask(width),
			k_num,
			config,
			marker: PhantomData,
		}
	}
pub fn new ( probability : f64 , tolerance : f64 , config : C :: Config ) -> Self { let width = Self :: optimal_width ( tolerance ) ; let k_num = Self :: optimal_k_num ( probability ) ; let counters : Vec < Vec < C > > = ( 0 .. k_num ) . map ( | _ | ( 0 .. width ) . map ( | _ | C :: new ( & config ) ) . collect ( ) ) . collect ( ) ; let offsets = vec ! [ 0 k_num ] ; Self { counters , offsets , mask : Self :: mask ( width ) , k_num , config , marker : PhantomData , } }
Create an empty `CountMinSketch` data structure with the specified error tolerance.
Create an empty ` CountMinSketch ` data structure with the specified error tolerance .
probability
f64
tolerance
f64
config
C::Config