pub struct HyperLogLog { /* private fields */ }Expand description
A HyperLogLog counter
Implementations§
Source§impl HyperLogLog
impl HyperLogLog
Sourcepub fn new_deterministic(error_rate: f64, seed: u128) -> Self
pub fn new_deterministic(error_rate: f64, seed: u128) -> Self
Create a new HyperLogLog counter with the given error rate and seed.
Sourcepub fn new(error_rate: f64) -> Self
pub fn new(error_rate: f64) -> Self
Create a new HyperLogLog counter with the given error rate and a random
seed.
Sourcepub fn new_from_template(hll: &HyperLogLog) -> Self
pub fn new_from_template(hll: &HyperLogLog) -> Self
Create a new HyperLogLog counter with the same parameters as an
existing one.
Sourcepub fn insert_by_hash_value(&mut self, x: u64)
pub fn insert_by_hash_value(&mut self, x: u64)
Insert a new u64 value into the HyperLogLog counter.
Sourcepub fn merge(&mut self, src: &HyperLogLog)
pub fn merge(&mut self, src: &HyperLogLog)
Merge another HyperLogLog counter into the current one.
Trait Implementations§
Source§impl Clone for HyperLogLog
impl Clone for HyperLogLog
Source§fn clone(&self) -> HyperLogLog
fn clone(&self) -> HyperLogLog
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for HyperLogLog
impl RefUnwindSafe for HyperLogLog
impl Send for HyperLogLog
impl Sync for HyperLogLog
impl Unpin for HyperLogLog
impl UnsafeUnpin for HyperLogLog
impl UnwindSafe for HyperLogLog
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more