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());

Methods

impl Min
[src]

Create a new minium estimator from a given value.

Create a new minimum estimator.

Estimate the minium of the population.

Trait Implementations

impl Debug for Min
[src]

Formats the value using the given formatter. Read more

impl Clone for Min
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Default for Min
[src]

Returns the "default value" for a type. Read more

impl FromIterator<f64> for Min
[src]

Creates a value from an iterator. Read more

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

Creates a value from an iterator. Read more

impl Estimate for Min
[src]

Add an observation sampled from the population.

Estimate the statistic of the population.

impl Merge for 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());

Auto Trait Implementations

impl Send for Min

impl Sync for Min