Struct stats::MinMax[][src]

pub struct MinMax<T> { /* fields omitted */ }

A commutative data structure for tracking minimum and maximum values.

This also stores the number of samples.

Methods

impl<T: PartialOrd + Clone> MinMax<T>
[src]

Create an empty state where min and max values do not exist.

Add a sample to the data.

Returns the minimum of the data set.

None is returned if and only if the number of samples is 0.

Returns the maximum of the data set.

None is returned if and only if the number of samples is 0.

Returns the number of data point.

Trait Implementations

impl<T: Clone> Clone for MinMax<T>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<T: PartialOrd> Commute for MinMax<T>
[src]

Merges the value other into self.

Merges the values in the iterator into self.

impl<T: PartialOrd> Default for MinMax<T>
[src]

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

impl<T: Debug> Debug for MinMax<T>
[src]

Formats the value using the given formatter. Read more

impl<T: PartialOrd + Clone> FromIterator<T> for MinMax<T>
[src]

Creates a value from an iterator. Read more

impl<T: PartialOrd + Clone> Extend<T> for MinMax<T>
[src]

Extends a collection with the contents of an iterator. Read more

Auto Trait Implementations

impl<T> Send for MinMax<T> where
    T: Send

impl<T> Sync for MinMax<T> where
    T: Sync