@@ -281,61 +281,61 @@ mod test {
281
281
282
282
#[ derive( Serialize , Deserialize ) ]
283
283
#[ serde( bound = "" ) ]
284
- struct HLL < V > ( HyperLogLog < V > ) ;
285
- impl < V : Hash > Ord for HLL < V > {
284
+ struct Hll < V > ( HyperLogLog < V > ) ;
285
+ impl < V : Hash > Ord for Hll < V > {
286
286
#[ inline( always) ]
287
287
fn cmp ( & self , other : & Self ) -> cmp:: Ordering {
288
288
self . 0 . len ( ) . partial_cmp ( & other. 0 . len ( ) ) . unwrap ( )
289
289
}
290
290
}
291
- impl < V : Hash > PartialOrd for HLL < V > {
291
+ impl < V : Hash > PartialOrd for Hll < V > {
292
292
#[ inline( always) ]
293
293
fn partial_cmp ( & self , other : & Self ) -> Option < cmp:: Ordering > {
294
294
self . 0 . len ( ) . partial_cmp ( & other. 0 . len ( ) )
295
295
}
296
296
}
297
- impl < V : Hash > PartialEq for HLL < V > {
297
+ impl < V : Hash > PartialEq for Hll < V > {
298
298
#[ inline( always) ]
299
299
fn eq ( & self , other : & Self ) -> bool {
300
300
self . 0 . len ( ) . eq ( & other. 0 . len ( ) )
301
301
}
302
302
}
303
- impl < V : Hash > Eq for HLL < V > { }
304
- impl < V : Hash > Clone for HLL < V > {
303
+ impl < V : Hash > Eq for Hll < V > { }
304
+ impl < V : Hash > Clone for Hll < V > {
305
305
fn clone ( & self ) -> Self {
306
306
Self ( self . 0 . clone ( ) )
307
307
}
308
308
}
309
- impl < V : Hash > New for HLL < V > {
309
+ impl < V : Hash > New for Hll < V > {
310
310
type Config = f64 ;
311
311
fn new ( config : & Self :: Config ) -> Self {
312
312
Self ( New :: new ( config) )
313
313
}
314
314
}
315
- impl < V : Hash > Intersect for HLL < V > {
315
+ impl < V : Hash > Intersect for Hll < V > {
316
316
fn intersect < ' a > ( iter : impl Iterator < Item = & ' a Self > ) -> Option < Self >
317
317
where
318
318
Self : Sized + ' a ,
319
319
{
320
320
Intersect :: intersect ( iter. map ( |x| & x. 0 ) ) . map ( Self )
321
321
}
322
322
}
323
- impl < ' a , V : Hash > UnionAssign < & ' a HLL < V > > for HLL < V > {
323
+ impl < ' a , V : Hash > UnionAssign < & ' a Hll < V > > for Hll < V > {
324
324
fn union_assign ( & mut self , rhs : & ' a Self ) {
325
325
self . 0 . union_assign ( & rhs. 0 )
326
326
}
327
327
}
328
- impl < ' a , V : Hash > ops:: AddAssign < & ' a V > for HLL < V > {
328
+ impl < ' a , V : Hash > ops:: AddAssign < & ' a V > for Hll < V > {
329
329
fn add_assign ( & mut self , rhs : & ' a V ) {
330
330
self . 0 . add_assign ( rhs)
331
331
}
332
332
}
333
- impl < V : Hash > Debug for HLL < V > {
333
+ impl < V : Hash > Debug for Hll < V > {
334
334
fn fmt ( & self , fmt : & mut fmt:: Formatter ) -> fmt:: Result {
335
335
self . 0 . fmt ( fmt)
336
336
}
337
337
}
338
- impl < V > IntersectPlusUnionIsPlus for HLL < V > {
338
+ impl < V > IntersectPlusUnionIsPlus for Hll < V > {
339
339
const VAL : bool = <HyperLogLog < V > as IntersectPlusUnionIsPlus >:: VAL ;
340
340
}
341
341
@@ -344,7 +344,7 @@ mod test {
344
344
fn top_hll ( ) {
345
345
let mut rng =
346
346
rand:: rngs:: SmallRng :: from_seed ( [ 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 , 15 ] ) ;
347
- let mut top = Top :: < String , HLL < String > > :: new ( 1000 , 0.99 , 2.0 / 1000.0 , 0.00408 ) ;
347
+ let mut top = Top :: < String , Hll < String > > :: new ( 1000 , 0.99 , 2.0 / 1000.0 , 0.00408 ) ;
348
348
// let mut x = HashMap::new();
349
349
for _ in 0 ..5_000 {
350
350
let ( a, b) = ( rng. gen_range ( 0 , 2 ) == 0 , rng. gen_range ( 0 , 2 ) == 0 ) ;
@@ -373,7 +373,7 @@ mod test {
373
373
374
374
let mut rng =
375
375
rand:: rngs:: SmallRng :: from_seed ( [ 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 , 15 ] ) ;
376
- let mut top = Top :: < String , HLL < String > > :: new ( 1000 , 0.99 , 2.0 / 1000.0 , 0.05 ) ;
376
+ let mut top = Top :: < String , Hll < String > > :: new ( 1000 , 0.99 , 2.0 / 1000.0 , 0.05 ) ;
377
377
// let mut x = HashMap::new();
378
378
for _ in 0 ..5_000_000 {
379
379
let ( a, b) = ( rng. gen_range ( 0 , 2 ) == 0 , rng. gen_range ( 0 , 2 ) == 0 ) ;
0 commit comments