pub fn new(size:usize, build_hasher: &'a BuildHasherDefault<H>) -> SuperMinHash<'a, T, H> {
        //
        let mut sketch_init = Vec::<f64>::with_capacity(size);
        let mut q_init = Vec::<i64>::with_capacity(size);
        let mut p_init = Vec::<usize>::with_capacity(size);
        let mut b_init = Vec::<i64>::with_capacity(size);
        // we initialize sketches by something large.
        // If we initialize by f64::MAX we got a bug beccause f64::MAX as usize is 0! in cmp::min(skect, m-1) in j_2
        // computation in sketch_batch. Other solution is using f64::MAX.floor() 
        let large:f64 = size as f64 * size as f64;
        for _i in 0..size {
            sketch_init.push(large);
            q_init.push(-1);
            p_init.push(0);
            b_init.push(0);
        }
        b_init[size-1] = size as i64;
        //
        SuperMinHash{hsketch: sketch_init, q: q_init, p: p_init, b: b_init, item_rank: 0,
                     b_hasher: build_hasher, t_marker : PhantomData,}
    }
/// allocate a struct to do superminhash.
/// size is size of sketch. build_hasher is the build hasher for the type of Hasher we want.
allocate a struct to do superminhash.
size is size of sketch. build_hasher is the build hasher for the type of Hasher we want.
allocate a struct to do superminhash . size is size of sketch . build_hasher is the build hasher for the type of Hasher we want .
pub fn new(size:usize, build_hasher: &'a BuildHasherDefault<H>) -> SuperMinHash<'a, T, H> {
        //
        let mut sketch_init = Vec::<f64>::with_capacity(size);
        let mut q_init = Vec::<i64>::with_capacity(size);
        let mut p_init = Vec::<usize>::with_capacity(size);
        let mut b_init = Vec::<i64>::with_capacity(size);
        // we initialize sketches by something large.
        // If we initialize by f64::MAX we got a bug beccause f64::MAX as usize is 0! in cmp::min(skect, m-1) in j_2
        // computation in sketch_batch. Other solution is using f64::MAX.floor() 
        let large:f64 = size as f64 * size as f64;
        for _i in 0..size {
            sketch_init.push(large);
            q_init.push(-1);
            p_init.push(0);
            b_init.push(0);
        }
        b_init[size-1] = size as i64;
        //
        SuperMinHash{hsketch: sketch_init, q: q_init, p: p_init, b: b_init, item_rank: 0,
                     b_hasher: build_hasher, t_marker : PhantomData,}
    }
pub fn new ( size : usize , build_hasher : & ' a BuildHasherDefault < H > ) -> SuperMinHash < ' a , T , H > { // let mut sketch_init = Vec :: < f64 > :: with_capacity ( size ) ; let mut q_init = Vec :: < i64 > :: with_capacity ( size ) ; let mut p_init = Vec :: < usize > :: with_capacity ( size ) ; let mut b_init = Vec :: < i64 > :: with_capacity ( size ) ; // we initialize sketches by something large. // If we initialize by f64::MAX we got a bug beccause f64::MAX as usize is 0! in cmp::min(skect, m-1) in j_2 // computation in sketch_batch. Other solution is using f64::MAX.floor()  let large : f64 = size as f64 * size as f64 ; for _i in 0 .. size { sketch_init . push ( large ) ; q_init . push ( - 1 ) ; p_init . push ( 0 ) ; b_init . push ( 0 ) ; } b_init [ size - 1 ] = size as i64 ; // SuperMinHash { hsketch : sketch_init , q : q_init , p : p_init , b : b_init , item_rank : 0 , b_hasher : build_hasher , t_marker : PhantomData , } }
allocate a struct to do superminhash.
allocate a struct to do superminhash .
size
usize
build_hasher
&'a BuildHasherDefault<H>