pub struct DefaultEstimator<L: EstimationLogic, BL: Borrow<L>, B> { /* private fields */ }Expand description
A default estimator for generic EstimationLogic and backends.
Implementations§
Source§impl<L: EstimationLogic, BL: Borrow<L>, B> DefaultEstimator<L, BL, B>
impl<L: EstimationLogic, BL: Borrow<L>, B> DefaultEstimator<L, BL, B>
Trait Implementations§
Source§impl<L: EstimationLogic + Clone, BL: Borrow<L>, B: AsMut<L::Backend>> AsMut<<L as EstimationLogic>::Backend> for DefaultEstimator<L, BL, B>
impl<L: EstimationLogic + Clone, BL: Borrow<L>, B: AsMut<L::Backend>> AsMut<<L as EstimationLogic>::Backend> for DefaultEstimator<L, BL, B>
Source§impl<L: EstimationLogic + Clone, BL: Borrow<L>, B: AsRef<L::Backend>> AsRef<<L as EstimationLogic>::Backend> for DefaultEstimator<L, BL, B>
impl<L: EstimationLogic + Clone, BL: Borrow<L>, B: AsRef<L::Backend>> AsRef<<L as EstimationLogic>::Backend> for DefaultEstimator<L, BL, B>
Source§impl<L: EstimationLogic + Clone, BL: Borrow<L>, B: AsRef<L::Backend>> Estimator<L> for DefaultEstimator<L, BL, B>
impl<L: EstimationLogic + Clone, BL: Borrow<L>, B: AsRef<L::Backend>> Estimator<L> for DefaultEstimator<L, BL, B>
Source§type OwnedEstimator = DefaultEstimator<L, L, Box<<L as EstimationLogic>::Backend>>
type OwnedEstimator = DefaultEstimator<L, L, Box<<L as EstimationLogic>::Backend>>
The type returned by
Estimator::into_owned.Source§fn estimate(&self) -> f64
fn estimate(&self) -> f64
Returns an estimation of the number of distinct elements that have been
added to the estimator so far.
Source§fn into_owned(self) -> Self::OwnedEstimator
fn into_owned(self) -> Self::OwnedEstimator
Converts this estimator into an owned version capable of mutation.
Source§impl<L: EstimationLogic + Clone, BL: Borrow<L>, B: AsRef<L::Backend> + AsMut<L::Backend>> EstimatorMut<L> for DefaultEstimator<L, BL, B>
impl<L: EstimationLogic + Clone, BL: Borrow<L>, B: AsRef<L::Backend> + AsMut<L::Backend>> EstimatorMut<L> for DefaultEstimator<L, BL, B>
Source§impl<L: EstimationLogic + MergeEstimationLogic + Clone, BL: Borrow<L>, B: AsRef<L::Backend> + AsMut<L::Backend>> MergeEstimator<L> for DefaultEstimator<L, BL, B>
impl<L: EstimationLogic + MergeEstimationLogic + Clone, BL: Borrow<L>, B: AsRef<L::Backend> + AsMut<L::Backend>> MergeEstimator<L> for DefaultEstimator<L, BL, B>
Auto Trait Implementations§
impl<L, BL, B> Freeze for DefaultEstimator<L, BL, B>
impl<L, BL, B> RefUnwindSafe for DefaultEstimator<L, BL, B>
impl<L, BL, B> Send for DefaultEstimator<L, BL, B>
impl<L, BL, B> Sync for DefaultEstimator<L, BL, B>
impl<L, BL, B> Unpin for DefaultEstimator<L, BL, B>
impl<L, BL, B> UnwindSafe for DefaultEstimator<L, BL, B>
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
Source§impl<T, U> CastableInto<U> for Twhere
U: CastableFrom<T>,
impl<T, U> CastableInto<U> for Twhere
U: CastableFrom<T>,
Source§impl<T> DowncastableFrom<T> for T
impl<T> DowncastableFrom<T> for T
Source§fn downcast_from(value: T) -> T
fn downcast_from(value: T) -> T
Truncate the current UnsignedInt to a possibly smaller size
Source§impl<T, U> DowncastableInto<U> for Twhere
U: DowncastableFrom<T>,
impl<T, U> DowncastableInto<U> for Twhere
U: DowncastableFrom<T>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<S> ParseFormatted for S
impl<S> ParseFormatted for S
Source§fn parse_formatted<F, N>(&self, format: &F) -> Result<N, Error>where
F: Format,
N: FromFormattedStr,
fn parse_formatted<F, N>(&self, format: &F) -> Result<N, Error>where
F: Format,
N: FromFormattedStr,
Converts
self (typically a formatted string) into a number (see Examples above).Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> UpcastableFrom<T> for T
impl<T> UpcastableFrom<T> for T
Source§fn upcast_from(value: T) -> T
fn upcast_from(value: T) -> T
Extend the current UnsignedInt to a possibly bigger size.