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]

[src]

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

[src]

Add a sample to the data.

[src]

Returns the minimum of the data set.

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

[src]

Returns the maximum of the data set.

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

[src]

Returns the number of data point.

Trait Implementations

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

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

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

[src]

Merges the value other into self.

[src]

Merges the values in the iterator into self.

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

[src]

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

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

[src]

Formats the value using the given formatter. Read more

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

[src]

Creates a value from an iterator. Read more

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

[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