Struct average::Min[][src]

pub struct Min { /* fields omitted */ }

Estimate the minimum of a sequence of numbers (“population”).

Example

use average::Min;

let a: Min = (1..6).map(f64::from).collect();
println!("The minimum is {}.", a.min());

Implementations

impl Min[src]

pub fn from_value(x: f64) -> Min[src]

Create a new minium estimator from a given value.

pub fn new() -> Min[src]

Create a new minimum estimator.

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

Estimate the minium of the population.

Trait Implementations

impl Clone for Min[src]

impl Debug for Min[src]

impl Default for Min[src]

impl<'de> Deserialize<'de> for Min[src]

impl Estimate for Min[src]

impl<'a> FromIterator<&'a f64> for Min[src]

impl FromIterator<f64> for Min[src]

impl<'a> FromParallelIterator<&'a f64> for Min[src]

impl FromParallelIterator<f64> for Min[src]

impl Merge for Min[src]

fn merge(&mut self, other: &Min)[src]

Merge another sample into this one.

Example

use average::{Min, Merge};

let sequence: &[f64] = &[1., 2., 3., 4., 5., 6., 7., 8., 9.];
let (left, right) = sequence.split_at(3);
let min_total: Min = sequence.iter().collect();
let mut min_left: Min = left.iter().collect();
let min_right: Min = right.iter().collect();
min_left.merge(&min_right);
assert_eq!(min_total.min(), min_left.min());

impl Serialize for Min[src]

Auto Trait Implementations

impl RefUnwindSafe for Min

impl Send for Min

impl Sync for Min

impl Unpin for Min

impl UnwindSafe for Min

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<S, T> Cast<T> for S where
    T: Conv<S>, 
[src]

impl<S, T> CastFloat<T> for S where
    T: ConvFloat<S>, 
[src]

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

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

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

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

impl<T> Pointable for T

type Init = T

The type for initializers.

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

type Owned = T

The resulting type after obtaining ownership.

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.