pub struct Frequencies<T> { /* private fields */ }
Expand description

A commutative data structure for exact frequency counts.

Implementations

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.

Returns true if there is no frequency/cardinality data.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Merges the value other into self.

Merges the values in the iterator into self.

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

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

🔬 This is a nightly-only experimental API. (extend_one)

Extends a collection with exactly one element.

🔬 This is a nightly-only experimental API. (extend_one)

Reserves capacity in a collection for the given number of additional elements. Read more

Creates a value from an iterator. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.