Struct amadeus_streaming::HyperLogLog[][src]

pub struct HyperLogLog<V: ?Sized> { /* fields omitted */ }
Expand description

Implementations

impl<V: ?Sized> HyperLogLog<V> where
    V: Hash
[src]

pub fn new(error_rate: f64) -> Self[src]

Create an empty HyperLogLog data structure with the specified error tolerance.

pub fn new_from(hll: &Self) -> Self[src]

Create an empty HyperLogLog data structure, copying the error tolerance from hll.

pub fn push(&mut self, value: &V)[src]

“Visit” an element.

pub fn len(&self) -> f64[src]

Retrieve an estimate of the carginality of the stream.

pub fn is_empty(&self) -> bool[src]

Returns true if empty.

pub fn union(&mut self, src: &Self)[src]

Merge another HyperLogLog data structure into self.

This is the same as an HLL approximating cardinality of the union of two multisets.

pub fn intersect(&mut self, src: &Self)[src]

Intersect another HyperLogLog data structure into self.

Note: This is different to an HLL approximating cardinality of the intersection of two multisets.

pub fn clear(&mut self)[src]

Clears the HyperLogLog data structure, as if it was new.

Trait Implementations

impl<'a, V: ?Sized> AddAssign<&'a HyperLogLog<V>> for HyperLogLog<V> where
    V: Hash
[src]

fn add_assign(&mut self, rhs: &'a Self)[src]

Performs the += operation. Read more

impl<'a, V: ?Sized> AddAssign<&'a V> for HyperLogLog<V> where
    V: Hash
[src]

fn add_assign(&mut self, rhs: &'a V)[src]

Performs the += operation. Read more

impl<V: ?Sized> Clone for HyperLogLog<V>[src]

fn clone(&self) -> Self[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<V: ?Sized> Debug for HyperLogLog<V> where
    V: Hash
[src]

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl<'de, V: ?Sized> Deserialize<'de> for HyperLogLog<V>[src]

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
    __D: Deserializer<'de>, 
[src]

Deserialize this value from the given Serde deserializer. Read more

impl<V: ?Sized> Intersect for HyperLogLog<V> where
    V: Hash
[src]

fn intersect<'a>(iter: impl Iterator<Item = &'a Self>) -> Option<Self> where
    Self: Sized + 'a, 
[src]

Intersect.

impl<V: ?Sized> IntersectPlusUnionIsPlus for HyperLogLog<V>[src]

const VAL: bool[src]

Apply optimisation or not

impl<V: ?Sized> New for HyperLogLog<V> where
    V: Hash
[src]

type Config = f64

The type of data required to instantiate a new Self.

fn new(config: &Self::Config) -> Self[src]

Instantiate a new Self with the given <Self as New>::Config.

impl<V: ?Sized> Serialize for HyperLogLog<V>[src]

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
    __S: Serializer
[src]

Serialize this value into the given Serde serializer. Read more

impl<'a, V: ?Sized> UnionAssign<&'a HyperLogLog<V>> for HyperLogLog<V> where
    V: Hash
[src]

fn union_assign(&mut self, rhs: &'a Self)[src]

Union.

Auto Trait Implementations

impl<V: ?Sized> RefUnwindSafe for HyperLogLog<V>

impl<V: ?Sized> Send for HyperLogLog<V>

impl<V: ?Sized> Sync for HyperLogLog<V>

impl<V: ?Sized> Unpin for HyperLogLog<V>

impl<V: ?Sized> UnwindSafe for HyperLogLog<V>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

pub fn vzip(self) -> V

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]