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]

[src]

Create a new frequency table with no samples.

[src]

Add a sample to the frequency table.

[src]

Return the number of occurrences of v in the data.

[src]

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

[src]

Returns the mode if one exists.

[src]

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

[src]

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

[src]

Returns the cardinality of the data.

Trait Implementations

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

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

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

[src]

Formats the value using the given formatter. Read more

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

[src]

Merges the value other into self.

[src]

Merges the values in the iterator into self.

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

[src]

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

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

[src]

Creates a value from an iterator. Read more

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

[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