Struct criterion_stats::Distribution[][src]

pub struct Distribution<A>(_);

The bootstrap distribution of some parameter

Implementations

impl<A> Distribution<A> where
    A: Float, 
[src]

pub fn from(values: Box<[A]>) -> Distribution<A>[src]

Create a distribution from the given values

pub fn confidence_interval(&self, confidence_level: A) -> (A, A) where
    usize: From<A, Output = Result<usize, Error>>, 
[src]

Computes the confidence interval of the population parameter using percentiles

Panics

Panics if the confidence_level is not in the (0, 1) range.

pub fn p_value(&self, t: A, tails: &Tails) -> A[src]

Computes the “likelihood” of seeing the value t or “more extreme” values in the distribution.

Methods from Deref<Target = Sample<A>>

pub fn max(&self) -> A[src]

Returns the biggest element in the sample

  • Time: O(length)

pub fn mean(&self) -> A[src]

Returns the arithmetic average of the sample

  • Time: O(length)

pub fn median_abs_dev(&self, median: Option<A>) -> A where
    usize: From<A, Output = Result<usize, Error>>, 
[src]

Returns the median absolute deviation

The median can be optionally passed along to speed up (2X) the computation

  • Time: O(length)
  • Memory: O(length)

pub fn median_abs_dev_pct(&self) -> A where
    usize: From<A, Output = Result<usize, Error>>, 
[src]

Returns the median absolute deviation as a percentage of the median

  • Time: O(length)
  • Memory: O(length)

pub fn min(&self) -> A[src]

Returns the smallest element in the sample

  • Time: O(length)

pub fn percentiles(&self) -> Percentiles<A> where
    usize: From<A, Output = Result<usize, Error>>, 
[src]

Returns a “view” into the percentiles of the sample

This “view” makes consecutive computations of percentiles much faster (O(1))

  • Time: O(N log N) where N = length
  • Memory: O(length)

pub fn std_dev(&self, mean: Option<A>) -> A[src]

Returns the standard deviation of the sample

The mean can be optionally passed along to speed up (2X) the computation

  • Time: O(length)

pub fn std_dev_pct(&self) -> A[src]

Returns the standard deviation as a percentage of the mean

  • Time: O(length)

pub fn sum(&self) -> A[src]

Returns the sum of all the elements of the sample

  • Time: O(length)

pub fn t(&self, other: &Sample<A>) -> A[src]

Returns the t score between these two samples

  • Time: O(length)

pub fn var(&self, mean: Option<A>) -> A[src]

Returns the variance of the sample

The mean can be optionally passed along to speed up (2X) the computation

  • Time: O(length)

pub fn bootstrap<T, S>(
    &self,
    nresamples: usize,
    statistic: S
) -> T::Distributions where
    S: Fn(&Sample<A>) -> T,
    S: Sync,
    T: Tuple,
    T: Send,
    T::Distributions: Send,
    T::Builder: Send
[src]

Returns the bootstrap distributions of the parameters estimated by the 1-sample statistic

  • Multi-threaded
  • Time: O(nresamples)
  • Memory: O(nresamples)

Trait Implementations

impl<A> Deref for Distribution<A>[src]

type Target = Sample<A>

The resulting type after dereferencing.

Auto Trait Implementations

impl<A> RefUnwindSafe for Distribution<A> where
    A: RefUnwindSafe

impl<A> Send for Distribution<A> where
    A: Send

impl<A> Sync for Distribution<A> where
    A: Sync

impl<A> Unpin for Distribution<A>

impl<A> UnwindSafe for Distribution<A> where
    A: UnwindSafe

Blanket Implementations

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

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

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

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

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

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.

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.