Struct stats::Frequencies[][src]

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

A commutative data structure for exact frequency counts.

Methods

impl<T: Eq + Hash> Frequencies<T>
[src]

Create a new frequency table with no samples.

Add a sample to the frequency table.

Return the number of occurrences of v in the data.

Return the cardinality (number of unique elements) in the data.

Returns the mode if one exists.

Return a Vec of elements and their corresponding counts in descending order.

Return a Vec of elements and their corresponding counts in ascending order.

Returns the cardinality of the data.

Trait Implementations

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<T: Debug + Eq + Hash> Debug for Frequencies<T>
[src]

Formats the value using the given formatter. Read more

impl<T: Eq + Hash> Commute for Frequencies<T>
[src]

Merges the value other into self.

Merges the values in the iterator into self.

impl<T: Eq + Hash> Default for Frequencies<T>
[src]

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

impl<T: Eq + Hash> FromIterator<T> for Frequencies<T>
[src]

Creates a value from an iterator. Read more

impl<T: Eq + Hash> Extend<T> for Frequencies<T>
[src]

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

Auto Trait Implementations

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

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