[−][src]Struct average::Quantile
Estimate the p-quantile of a sequence of numbers ("population").
The algorithm uses constant space but does not provide any upper bound on
the error. For algorithms that use growing space with bounded error, see
the quantiles crate. They are
recommended over this algorithm for small samples.
Methods
impl Quantile[src]
pub fn new(p: f64) -> Quantile[src]
Create a new p-quantile estimator.
Panics if p is not between 0 and 1.
pub fn p(&self) -> f64[src]
Return the value of p for this p-quantile.
pub fn quantile(&self) -> f64[src]
Estimate the p-quantile of the population.
Returns 0 for an empty sample.
pub fn len(&self) -> u64[src]
Return the sample size.
pub fn is_empty(&self) -> bool[src]
Determine whether the sample is empty.
Trait Implementations
impl Estimate for Quantile[src]
impl Debug for Quantile[src]
impl Clone for Quantile[src]
fn clone(&self) -> Quantile[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl Default for Quantile[src]
Auto Trait Implementations
Blanket Implementations
impl<T> From<T> for T[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T, Dst> ConvAsUtil<Dst> for T[src]
fn approx(self) -> Result<Dst, Self::Err> where
Self: ApproxInto<Dst, DefaultApprox>, [src]
Self: ApproxInto<Dst, DefaultApprox>,
Approximate the subject with the default scheme.
fn approx_by<Scheme>(self) -> Result<Dst, Self::Err> where
Scheme: ApproxScheme,
Self: ApproxInto<Dst, Scheme>, [src]
Scheme: ApproxScheme,
Self: ApproxInto<Dst, Scheme>,
Approximate the subject with a specific scheme.
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Src where
Scheme: ApproxScheme, [src]
Scheme: ApproxScheme,
type Err = NoError
The error type produced by a failed conversion.
fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>[src]
impl<Src> ValueFrom<Src> for Src[src]
type Err = NoError
The error type produced by a failed conversion.
fn value_from(src: Src) -> Result<Src, <Src as ValueFrom<Src>>::Err>[src]
impl<T> ConvUtil for T[src]
fn approx_as<Dst>(self) -> Result<Dst, Self::Err> where
Self: ApproxInto<Dst, DefaultApprox>, [src]
Self: ApproxInto<Dst, DefaultApprox>,
Approximate the subject to a given type with the default scheme.
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err> where
Scheme: ApproxScheme,
Self: ApproxInto<Dst, Scheme>, [src]
Scheme: ApproxScheme,
Self: ApproxInto<Dst, Scheme>,
Approximate the subject to a given type with a specific scheme.
fn into_as<Dst>(self) -> Dst where
Self: Into<Dst>, [src]
Self: Into<Dst>,
Convert the subject to a given type.
fn try_as<Dst>(self) -> Result<Dst, Self::Err> where
Self: TryInto<Dst>, [src]
Self: TryInto<Dst>,
Attempt to convert the subject to a given type.
fn value_as<Dst>(self) -> Result<Dst, Self::Err> where
Self: ValueInto<Dst>, [src]
Self: ValueInto<Dst>,
Attempt a value conversion of the subject to a given type.
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Src where
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme, [src]
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
The error type produced by a failed conversion.
fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>[src]
impl<Src, Dst> ValueInto<Dst> for Src where
Dst: ValueFrom<Src>, [src]
Dst: ValueFrom<Src>,
type Err = <Dst as ValueFrom<Src>>::Err
The error type produced by a failed conversion.
fn value_into(self) -> Result<Dst, <Src as ValueInto<Dst>>::Err>[src]
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<Src> TryFrom<Src> for Src[src]
type Err = NoError
The error type produced by a failed conversion.
fn try_from(src: Src) -> Result<Src, <Src as TryFrom<Src>>::Err>[src]
impl<Src, Dst> TryInto<Dst> for Src where
Dst: TryFrom<Src>, [src]
Dst: TryFrom<Src>,